mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
fix(website): navigation and 404
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { useUnregisterServiceWorker } from '~/hooks/useUnregisterServiceWorker';
|
||||
|
||||
export function ServiceWorker() {
|
||||
useUnregisterServiceWorker();
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import { VscSymbolField } from '@react-icons/all-files/vsc/VscSymbolField';
|
||||
import { VscSymbolInterface } from '@react-icons/all-files/vsc/VscSymbolInterface';
|
||||
import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod';
|
||||
import { VscSymbolVariable } from '@react-icons/all-files/vsc/VscSymbolVariable';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { useSelectedLayoutSegment } from 'next/navigation';
|
||||
import { useMemo } from 'react';
|
||||
import { ItemLink } from './ItemLink';
|
||||
import { Section } from './Section';
|
||||
@@ -83,7 +83,7 @@ function resolveIcon(item: string) {
|
||||
}
|
||||
|
||||
export function Sidebar({ members }: { members: SidebarSectionItemData[] }) {
|
||||
const pathname = usePathname();
|
||||
const segment = useSelectedLayoutSegment();
|
||||
const { setOpened } = useNav();
|
||||
|
||||
const groupItems = useMemo(() => groupMembers(members), [members]);
|
||||
@@ -97,7 +97,7 @@ export function Sidebar({ members }: { members: SidebarSectionItemData[] }) {
|
||||
{groupItems[group].map((member, index) => (
|
||||
<ItemLink
|
||||
className={`dark:border-dark-100 border-light-800 focus:ring-width-2 focus:ring-blurple ml-5 flex flex-col border-l p-[5px] pl-6 outline-0 focus:rounded focus:border-0 focus:ring ${
|
||||
pathname === member.href
|
||||
decodeURIComponent(segment ?? '') === member.href
|
||||
? 'bg-blurple text-white'
|
||||
: 'dark:hover:bg-dark-200 dark:active:bg-dark-100 hover:bg-light-700 active:bg-light-800'
|
||||
}`}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { useSystemThemeFallback } from '~/hooks/useSystemThemeFallback';
|
||||
|
||||
export function SystemThemeFallback() {
|
||||
useSystemThemeFallback();
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user