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