Skip to content

Commit

Permalink
rka-21: clean up layout a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
konstrybakov committed Jun 12, 2024
1 parent d817919 commit 54d33e7
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isAdmin } from '@/lib/auth/is-admin'
import { type User, currentUser } from '@clerk/nextjs/server'
import { PlusIcon } from '@radix-ui/react-icons'
import { Box, Button, Heading, Section } from '@radix-ui/themes'
import { Box, Button, Flex, Heading, Section } from '@radix-ui/themes'
import Link from 'next/link'
import { JobList } from './components/list/job-list'

Expand All @@ -13,25 +13,22 @@ export default async function Home() {
return (
<>
<Section size="1">
<Box mb="4">
<Flex align="center" justify="between">
<Heading>Oh! What a tracker!</Heading>
</Box>
</Section>
{isAdmin(user) && (
<Section size="1">
<Box>
<Link href="/add">
<Button>
<PlusIcon />
Add a company
</Button>
</Link>
</Box>
</Section>
)}
<Section size="1">
<JobList />
{isAdmin(user) && (
<Box>
<Link href="/add">
<Button>
<PlusIcon />
Add a company
</Button>
</Link>
</Box>
)}
</Flex>
</Section>

<JobList />
</>
)
}

0 comments on commit 54d33e7

Please sign in to comment.