1import { SnackLogo } from '@expo/styleguide';
2import { ChangelogIcon, DiscordIcon, MessageDotsSquareIcon } from '@expo/styleguide-icons';
3import { useRouter } from 'next/compat/router';
4
5import { SidebarSingleEntry } from './SidebarSingleEntry';
6import { ArchiveIcon } from './icons/Archive';
7
8import { getPageSection } from '~/common/routes';
9
10export const SidebarFooter = () => {
11  const router = useRouter();
12  const isArchive = router?.pathname ? getPageSection(router.pathname) === 'archive' : false;
13  return (
14    <div className="flex flex-col p-4 border-t border-t-default bg-default gap-0.5">
15      <SidebarSingleEntry
16        secondary
17        href="/archive"
18        title="Archive"
19        Icon={ArchiveIcon}
20        isActive={isArchive}
21      />
22      <SidebarSingleEntry
23        secondary
24        href="https://snack.expo.dev"
25        title="Expo Snack"
26        Icon={SnackLogo}
27        isExternal
28      />
29      <SidebarSingleEntry
30        secondary
31        href="https://chat.expo.dev"
32        title="Discord"
33        Icon={DiscordIcon}
34        isExternal
35      />
36      <SidebarSingleEntry
37        secondary
38        href="https://forums.expo.dev"
39        title="Forums"
40        Icon={MessageDotsSquareIcon}
41        isExternal
42      />
43      <SidebarSingleEntry
44        secondary
45        href="https://expo.dev/changelog"
46        title="Changelog"
47        Icon={ChangelogIcon}
48        isExternal
49      />
50    </div>
51  );
52};
53