Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zaknesler committed Jul 1, 2023
1 parent 526f99b commit e066cdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/components/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ export const RecipeList: React.FC<RecipeListProps> = ({
notFoundText = 'No recipes found',
}) => {
return (
<div className="flex flex-col gap-4 md:gap-8">
<div className="flex flex-1 flex-col gap-4 md:gap-8">
{isLoading ? (
<PulsingItems count={3} itemHeightClass="h-32" />
) : recipes?.length ? (
recipes.map(recipe => <RecipeSummary key={recipe.id} recipe={recipe} />)
) : (
<p className="text-center">{notFoundText}</p>
<p className="flex flex-1 items-center justify-center text-center">
{notFoundText}
</p>
)}
</div>
)
Expand Down
8 changes: 4 additions & 4 deletions src/components/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ export const Nav: React.FC<NavProps> = ({ open, onToggle }) => {
</nav>

{open && (
<div className="flex h-full flex-1 flex-col justify-between gap-4">
<div className="flex flex-1 flex-col justify-center overflow-y-auto text-center font-semibold">
<div className="flex flex-1 flex-col gap-4">
<div className="flex flex-1 flex-col justify-center gap-1 overflow-hidden text-center text-lg font-semibold">
{links.map(link => (
<Link
key={link.label}
href={link.href}
title={link.label}
className="p-3"
className="p-3 hover:bg-gray-100"
>
{link.label}
</Link>
))}
</div>
<Search expanded className="print:hidden" inputClassName="p-3" />
<Search expanded className="flex print:hidden" inputClassName="p-3" />
</div>
)}
</>
Expand Down
8 changes: 5 additions & 3 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ const MyApp: AppType = ({ Component, pageProps }) => {
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
</Head>
<main
className={`${monoFont.variable} mx-auto flex h-full w-full max-w-5xl flex-col gap-4 p-4 font-mono md:gap-8 md:p-8`}
className={`${monoFont.variable} mx-auto flex h-full w-full max-w-5xl flex-col font-mono`}
>
<Nav open={navOpen} onToggle={() => setNavOpen(!navOpen)} />
{!navOpen && <Component {...pageProps} />}
<div className="flex flex-1 flex-col gap-4 p-4 md:gap-8 md:p-8">
<Nav open={navOpen} onToggle={() => setNavOpen(!navOpen)} />
{!navOpen && <Component {...pageProps} />}
</div>
</main>
</>
)
Expand Down

0 comments on commit e066cdc

Please sign in to comment.