-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add dark mode package and entire set of updated layout components
- Loading branch information
Showing
66 changed files
with
6,783 additions
and
10,353 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
import { Metadata } from "next" | ||
import { Metadata } from 'next' | ||
|
||
import Footer from "@/modules/layout/templates/footer" | ||
import Nav from "@/modules/layout/templates/nav" | ||
import { getBaseURL } from "@/lib/util/env" | ||
import { getBaseURL } from '@/lib/util/env' | ||
import LayoutTemplate from '@/modules/layout' | ||
|
||
export const metadata: Metadata = { | ||
metadataBase: new URL(getBaseURL()), | ||
} | ||
|
||
export default async function PageLayout(props: { children: React.ReactNode }) { | ||
return ( | ||
<> | ||
<Nav /> | ||
{props.children} | ||
<Footer /> | ||
</> | ||
) | ||
export default function PageLayout(props: { children: React.ReactNode }) { | ||
return <LayoutTemplate>{props.children}</LayoutTemplate> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 24 additions & 24 deletions
48
...s/layout/components/cart-button/index.tsx → ...t/components-shared/cart-button/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import { notFound } from "next/navigation" | ||
import CartDropdown from "../cart-dropdown" | ||
import { enrichLineItems, retrieveCart } from "@/lib/data/cart" | ||
|
||
const fetchCart = async () => { | ||
const cart = await retrieveCart() | ||
|
||
if (!cart) { | ||
return null | ||
} | ||
|
||
if (cart?.items?.length) { | ||
const enrichedItems = await enrichLineItems(cart.items, cart.region_id!) | ||
cart.items = enrichedItems | ||
} | ||
|
||
return cart | ||
} | ||
|
||
export default async function CartButton() { | ||
const cart = await fetchCart() | ||
|
||
return <CartDropdown cart={cart} /> | ||
} | ||
// import { notFound } from 'next/navigation' | ||
import { enrichLineItems, retrieveCart } from '@/lib/data/cart' | ||
import CartDropdown from '../cart-dropdown' | ||
|
||
const fetchCart = async () => { | ||
const cart = await retrieveCart() | ||
|
||
if (!cart) { | ||
return null | ||
} | ||
|
||
if (cart?.items?.length) { | ||
const enrichedItems = await enrichLineItems(cart.items, cart.region_id!) | ||
cart.items = enrichedItems | ||
} | ||
|
||
return cart | ||
} | ||
|
||
export default async function CartButton() { | ||
const cart = await fetchCart() | ||
|
||
return <CartDropdown cart={cart} /> | ||
} |
Oops, something went wrong.