homeplay/src/pages/games/[id]/play.tsx

37 lines
666 B
TypeScript
Raw Normal View History

2025-03-11 13:06:14 -05:00
import { GetServerSideProps } from 'next';
import { Emulator } from '@/components/Emulator';
import styles from './play.module.scss';
type PageParams = {
id:string;
}
type PageProps = {
id:string;
}
export const getServerSideProps:GetServerSideProps = async ({ params }) => {
const { id } = params as PageParams;
return {
props: {
id
},
};
};
export const Page:React.FC<PageProps> = ({ id }) => {
return (
<div className={styles.play}>
<h1>Playing Game ID: {id}</h1>
<div className={styles.play__emulator}>
2025-03-11 13:58:20 -05:00
<Emulator
system='gbc'
/>
2025-03-11 13:06:14 -05:00
</div>
</div>
);
};
export default Page;