Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use react-icons instead of radix-ui/react-icons #29

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions components/layout/app-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GitHubLogoIcon, TwitterLogoIcon } from '@radix-ui/react-icons';
import { Flex, Link, Text } from '@radix-ui/themes';
import React from 'react';
import { FaGithub, FaXTwitter } from 'react-icons/fa6';

import { AppContent } from './app-content';

Expand All @@ -18,20 +18,20 @@ const FOOTER_SERVICE_LINKS = [
const FOOTER_SOCIAL_LINKS = [
{
href: 'https://github.com/experiment-station/beecast',
icon: <GitHubLogoIcon />,
icon: <FaGithub />,
title: 'GitHub',
},
{
href: 'https://twitter.com/beecast_ai',
icon: <TwitterLogoIcon />,
title: 'Twitter',
href: 'https://x.com/beecast_ai',
icon: <FaXTwitter />,
title: 'X.com',
},
] as const;

export function AppFooter() {
return (
<AppContent>
<Flex justify="between" py="4">
<Flex align="end" justify="between" py="4">
<Flex align="start" direction="column">
<Text size="2" weight="bold">
Built with ☕️ by your folks at the{' '}
Expand All @@ -57,23 +57,19 @@ export function AppFooter() {
</Flex>

<Flex align="end" direction="column">
<Flex align="center" gap="2">
<Flex align="center" gap="3">
{FOOTER_SOCIAL_LINKS.map((link) => (
<Link
color="gray"
highContrast
href={link.href}
key={link.href}
target="_blank"
title={link.title}
>
{link.icon}
<Text size="5">{link.icon}</Text>
</Link>
))}
</Flex>

<Text color="gray" size="2">
©2023 Experiment Station
</Text>
</Flex>
</Flex>
</AppContent>
Expand Down
37 changes: 31 additions & 6 deletions components/layout/app-header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ArrowRightIcon, PersonIcon } from '@radix-ui/react-icons';
import {
Avatar,
Button,
Expand All @@ -12,6 +11,14 @@
Text,
} from '@radix-ui/themes';
import Link from 'next/link';
import {
CgArrowRight,
CgDollar,
CgLogOut,

Check failure on line 17 in components/layout/app-header.tsx

View workflow job for this annotation

GitHub Actions / lint_and_typecheck

'CgLogOut' is defined but never used. Allowed unused vars must match /^_/u
CgMediaPodcast,
CgOptions,
CgProfile,
} from 'react-icons/cg';

import { UnstyledButton } from '../ui/unstyled-button';
import { AppContent } from './app-content';
Expand All @@ -37,7 +44,7 @@
<DropdownMenuRoot>
<DropdownMenuTrigger>
<Avatar
fallback={<PersonIcon />}
fallback={<CgProfile />}
radius="full"
src={props.user.avatarURL}
/>
Expand All @@ -56,7 +63,7 @@
{props.user.username}
</Text>

<Text color="gray">
<Text color="gray" size="1">
{props.user.credits === 0 ? 'No' : props.user.credits} credits
remaining
</Text>
Expand All @@ -65,8 +72,26 @@

<DropdownMenuSeparator />

<DropdownMenuItem>Your episodes</DropdownMenuItem>
<DropdownMenuItem>Settings</DropdownMenuItem>
<DropdownMenuItem>
<Flex align="center" gap="2">
<CgDollar />
<Text>Buy Credits</Text>
</Flex>
</DropdownMenuItem>

<DropdownMenuItem>
<Flex align="center" gap="2">
<CgMediaPodcast />
<Text>Your Shows</Text>
</Flex>
</DropdownMenuItem>

<DropdownMenuItem>
<Flex align="center" gap="2">
<CgOptions />
<Text>Settings</Text>
</Flex>
</DropdownMenuItem>

<DropdownMenuSeparator />

Expand All @@ -85,7 +110,7 @@
<Button asChild highContrast>
<Link href="/sign-in">
Get started
<ArrowRightIcon />
<CgArrowRight />
</Link>
</Button>
);
Expand Down
Loading