Added last update, cache strategy, telegram fail notifications, teachers photos
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
import { AddGroupButton } from '@/features/add-group'
|
||||
import { ThemeSwitcher } from '@/features/theme-switch'
|
||||
import { Button } from '@/shadcn/ui/button'
|
||||
import { useTheme } from 'next-themes'
|
||||
import Link from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import cx from 'classnames'
|
||||
|
||||
export function NavBar() {
|
||||
const { resolvedTheme } = useTheme()
|
||||
const { resolvedTheme, theme } = useTheme()
|
||||
|
||||
return (
|
||||
<header className="w-full p-2">
|
||||
<nav className={cx('rounded-lg p-2 w-full flex justify-between', { 'bg-slate-200': resolvedTheme === 'light', 'bg-slate-900': resolvedTheme === 'dark' })}>
|
||||
<nav className={`rounded-lg p-2 w-full flex justify-between ${(resolvedTheme || theme) === 'light' ? 'bg-slate-200' : ''} ${(resolvedTheme || theme) === 'dark' ? 'bg-slate-900' : ''}`}>
|
||||
<ul className="flex gap-2">
|
||||
<NavBarItem url="/ps7">ПС-7</NavBarItem>
|
||||
<NavBarItem url="/pks35k">ПКС-35к</NavBarItem>
|
||||
<AddGroupButton />
|
||||
</ul>
|
||||
<ThemeSwitcher />
|
||||
</nav>
|
||||
@@ -30,7 +31,7 @@ function NavBarItem({ url, children }: React.PropsWithChildren<{
|
||||
return (
|
||||
<li>
|
||||
<Link href={url}>
|
||||
<Button tabIndex={-1} variant={isActive ? 'default' : 'outline'}>{children}</Button>
|
||||
<Button tabIndex={-1} variant={isActive ? 'default' : 'secondary'}>{children}</Button>
|
||||
</Link>
|
||||
</li>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user