Skip to content

Commit

Permalink
added github project link in header
Browse files Browse the repository at this point in the history
  • Loading branch information
goodeats committed May 24, 2024
1 parent a09ea99 commit 7f3ccf8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions app/components/github-project-link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Icon } from './ui/icon'

export const GithubProjectLink = () => {
return (
<a
href="https://github.com/goodeats/epic-pppaaattt.xyz"
className="flex h-8 w-8 cursor-pointer items-center justify-center"
>
<Icon name="github-logo">
<span className="sr-only">GitHub Project</span>
</Icon>
</a>
)
}
10 changes: 9 additions & 1 deletion app/components/layout/page-header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Link } from '@remix-run/react'
import { useOptionalUser } from '#app/utils/user'
import { GithubProjectLink } from '../github-project-link'
import Logo from '../logo'
import { ThemeSwitch } from '../theme-switch'
import { Button } from '../ui/button'
Expand All @@ -13,7 +14,14 @@ const PageHeader = () => {
<nav className="flex flex-wrap items-center justify-between gap-4 sm:flex-nowrap md:gap-8">
<Logo />
<div className="flex items-center gap-10">
{user ? <UserDropdown /> : <ThemeSwitch />}
{user ? (
<UserDropdown />
) : (
<div className="flex gap-4">
<GithubProjectLink />
<ThemeSwitch />
</div>
)}
</div>
</nav>
</header>
Expand Down

0 comments on commit 7f3ccf8

Please sign in to comment.