Files
kspguti-schedule/src/pages/index.tsx
2025-11-18 03:57:22 +04:00

16 lines
452 B
TypeScript

import { GetServerSidePropsResult } from 'next'
import { groups } from '@/shared/data/groups'
export default function HomePage() { }
export async function getServerSideProps(): Promise<GetServerSidePropsResult<Record<string, never>>> {
// Получаем первую группу из списка
const firstGroupId = Object.keys(groups)[0]
return {
redirect: {
destination: `/${firstGroupId}`,
permanent: true
}
}
}