Idk go fuck yourself
This commit is contained in:
@@ -6,18 +6,16 @@ import { NextSerialized, nextDeserializer, nextSerialized } from '@/app/utils/da
|
|||||||
import { NavBar } from '@/widgets/navbar'
|
import { NavBar } from '@/widgets/navbar'
|
||||||
import { LastUpdateAt } from '@/entities/last-update-at'
|
import { LastUpdateAt } from '@/entities/last-update-at'
|
||||||
import { groups } from '@/shared/data/groups'
|
import { groups } from '@/shared/data/groups'
|
||||||
import { useRouter } from 'next/router'
|
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
|
|
||||||
type PageProps = NextSerialized<{
|
type PageProps = NextSerialized<{
|
||||||
schedule: Day[]
|
schedule: Day[]
|
||||||
parsedAt: Date
|
parsedAt: Date
|
||||||
|
groupName: string
|
||||||
}>
|
}>
|
||||||
|
|
||||||
export default function HomePage(props: PageProps) {
|
export default function HomePage(props: PageProps) {
|
||||||
const { schedule, parsedAt } = nextDeserializer(props)
|
const { schedule, parsedAt, groupName } = nextDeserializer(props)
|
||||||
const router = useRouter()
|
|
||||||
const groupName = groups[router.query.group as string][1]
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -55,7 +53,8 @@ export async function getServerSideProps(context: GetServerSidePropsContext<{ gr
|
|||||||
return {
|
return {
|
||||||
props: nextSerialized({
|
props: nextSerialized({
|
||||||
schedule: schedule,
|
schedule: schedule,
|
||||||
parsedAt: parsedAt
|
parsedAt: parsedAt,
|
||||||
|
groupName: 'fucking slaves'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,12 +21,10 @@ export function NavBar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
console.log(resolvedTheme, getSchemeTheme())
|
|
||||||
setSchemeTheme(getSchemeTheme())
|
setSchemeTheme(getSchemeTheme())
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const theme = resolvedTheme || schemeTheme
|
const theme = resolvedTheme || schemeTheme
|
||||||
console.log('theme', theme, cx('rounded-lg p-2 w-full flex justify-between', { 'bg-slate-200': theme === 'light', 'bg-slate-900': theme === 'dark' }))
|
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if(theme === 'light') {
|
if(theme === 'light') {
|
||||||
|
|||||||
Reference in New Issue
Block a user