-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: added SITE_NAME environment var * feat: removed icons * feat: updated app directory new pages and components * feat: latest changes for d2c app directory * chore: changeset * refactor: remove console log * fix: removed extra package.json content * feat: latest examples d2c starter kit app directory * feat: latest lock file * test: cart tests no longer had these files - expected * fix: replaced missing if for search modal * test: resolved tests after changes * feat: latest examples * chore: generated latest examples * feat: package fixes * feat: copied over fix for cookie issue * feat: instantsearch fix * feat: latest examples * feat: bumped to next 14 * feat: bumped react types version * feat: latest examples * feat: use workspace * chore: changeset --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e1f97c9
commit 462cccd
Showing
347 changed files
with
4,389 additions
and
5,539 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@elasticpath/react-shopper-hooks": patch | ||
"@elasticpath/d2c-schematics": patch | ||
--- | ||
|
||
bumped react types version |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@elasticpath/d2c-schematics": minor | ||
"composable-cli": patch | ||
--- | ||
|
||
Migrated D2C starter kit to Next.js 13 App directory routing |
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Blurb from "../../components/shared/blurb"; | ||
|
||
export default function About() { | ||
return <Blurb title="About" />; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"use client"; | ||
import Cart from "../../components/cart/Cart"; | ||
import CartIcon from "../../components/icons/cart"; | ||
import { useCart } from "@elasticpath/react-shopper-hooks"; | ||
import { resolveShoppingCartProps } from "../../lib/resolve-shopping-cart-props"; | ||
import Link from "next/link"; | ||
|
||
export default function CartPage() { | ||
const { removeCartItem, state } = useCart(); | ||
const shoppingCartProps = resolveShoppingCartProps(state, removeCartItem); | ||
|
||
return ( | ||
<div className="m-auto w-full max-w-base-max-width px-6 py-10 2xl:px-0"> | ||
{shoppingCartProps && ( | ||
<> | ||
<h1 className="pb-5 text-3xl font-bold">Your Shopping Cart</h1> | ||
<Cart {...shoppingCartProps} /> | ||
</> | ||
)} | ||
{(state.kind === "empty-cart-state" || | ||
state.kind === "uninitialised-cart-state" || | ||
state.kind === "loading-cart-state") && ( | ||
<div className="text-center min-h-64"> | ||
<CartIcon className="mx-auto h-24" /> | ||
<h3 className="mt-4 text-sm font-semibold text-gray-900"> | ||
Empty Cart | ||
</h3> | ||
<p className="mt-1 text-sm text-gray-500">Your cart is empty</p> | ||
<div className="mt-6"> | ||
<Link | ||
href="/" | ||
className="inline-flex items-center rounded-md bg-brand-primary px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-highlight focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-highlight" | ||
type="button" | ||
> | ||
Start shopping | ||
</Link> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"use client"; | ||
import Link from "next/link"; | ||
|
||
export default function GlobalError({ | ||
error, | ||
reset, | ||
}: { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}) { | ||
return ( | ||
<html> | ||
<body> | ||
<div className="flex h-[36rem] flex-col items-center justify-center gap-4 p-8"> | ||
<span className="text-center text-xl md:text-3xl"> | ||
{error.digest} - Internal server error. | ||
</span> | ||
<Link href="/" className="font-md md:font-lg text-brand-primary"> | ||
Back to home | ||
</Link> | ||
<button | ||
className="font-md md:font-lg text-brand-secondary" | ||
onClick={() => reset()} | ||
> | ||
Try again | ||
</button> | ||
</div> | ||
</body> | ||
</html> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Blurb from "../../components/shared/blurb"; | ||
|
||
export default function FAQ() { | ||
return <Blurb title="FAQ" />; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Inter } from "next/font/google"; | ||
import { ReactNode, Suspense } from "react"; | ||
import "../styles/globals.css"; | ||
import Header from "../components/header/Header"; | ||
import { getStoreContext } from "../lib/get-store-context"; | ||
import { getServerSideImplicitClient } from "../lib/epcc-server-side-implicit-client"; | ||
import { Providers } from "./providers"; | ||
import { Toaster } from "../components/toast/toaster"; | ||
import Footer from "../components/footer/Footer"; | ||
|
||
const { SITE_NAME } = process.env; | ||
const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL | ||
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` | ||
: "http://localhost:3000"; | ||
|
||
export const metadata = { | ||
metadataBase: new URL(baseUrl), | ||
title: { | ||
default: SITE_NAME!, | ||
template: `%s | ${SITE_NAME}`, | ||
}, | ||
robots: { | ||
follow: true, | ||
index: true, | ||
}, | ||
}; | ||
|
||
const inter = Inter({ | ||
subsets: ["latin"], | ||
display: "swap", | ||
variable: "--font-inter", | ||
}); | ||
|
||
export default async function RootLayout({ | ||
children, | ||
}: { | ||
children: ReactNode; | ||
}) { | ||
const client = getServerSideImplicitClient(); | ||
const storeContext = await getStoreContext(client); | ||
|
||
return ( | ||
<html lang="en" className={inter.variable}> | ||
<body> | ||
{/* headless ui needs this div - https://github.com/tailwindlabs/headlessui/issues/2752#issuecomment-1745272229 */} | ||
<div> | ||
<Providers store={storeContext}> | ||
<Header /> | ||
<Toaster /> | ||
<Suspense> | ||
<main>{children}</main> | ||
</Suspense> | ||
<Footer /> | ||
</Providers> | ||
</div> | ||
</body> | ||
</html> | ||
); | ||
} |
3 changes: 1 addition & 2 deletions
3
...lication/files/src/pages/404.tsx.template → examples/algolia/src/app/not-found.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
Oops, something went wrong.