From 763c40600c0daed6e195b24a150400093d2073de Mon Sep 17 00:00:00 2001 From: Rob Date: Sun, 6 Jul 2025 23:37:24 -0500 Subject: [PATCH] update format --- app/[page]/layout.tsx | 2 +- app/[page]/opengraph-image.tsx | 4 +- app/[page]/page.tsx | 29 +- app/api/revalidate/route.ts | 4 +- app/error.tsx | 6 +- app/globals.css | 4 +- app/layout.tsx | 26 +- app/opengraph-image.tsx | 2 +- app/page.tsx | 12 +- app/product/[handle]/page.tsx | 60 +- app/robots.ts | 8 +- app/search/[collection]/opengraph-image.tsx | 6 +- app/search/[collection]/page.tsx | 25 +- app/search/children-wrapper.tsx | 14 +- app/search/layout.tsx | 14 +- app/search/loading.tsx | 7 +- app/search/page.tsx | 19 +- app/sitemap.ts | 24 +- components/carousel.tsx | 17 +- components/cart/actions.ts | 42 +- components/cart/add-to-cart.tsx | 30 +- components/cart/cart-context.tsx | 100 +- components/cart/delete-item-button.tsx | 14 +- components/cart/edit-item-quantity-button.tsx | 30 +- components/cart/modal.tsx | 48 +- components/cart/open-cart.tsx | 11 +- components/grid/index.tsx | 16 +- components/grid/three-items.tsx | 28 +- components/grid/tile.tsx | 21 +- components/icons/logo.tsx | 6 +- components/label.tsx | 21 +- components/layout/footer-menu.tsx | 18 +- components/layout/footer.tsx | 29 +- components/layout/navbar/index.tsx | 18 +- components/layout/navbar/mobile-menu.tsx | 26 +- components/layout/navbar/search.tsx | 17 +- components/layout/product-grid-items.tsx | 16 +- components/layout/search/collections.tsx | 14 +- components/layout/search/filter/dropdown.tsx | 22 +- components/layout/search/filter/index.tsx | 16 +- components/layout/search/filter/item.tsx | 49 +- components/loading-dots.tsx | 8 +- components/logo-square.tsx | 18 +- components/opengraph-image.tsx | 28 +- components/price.tsx | 16 +- components/product/gallery.tsx | 21 +- components/product/product-context.tsx | 25 +- components/product/product-description.tsx | 10 +- components/product/variant-selector.tsx | 52 +- components/prose.tsx | 6 +- components/welcome-toast.tsx | 19 +- lib/constants.ts | 48 +- lib/shopify/fragments/cart.ts | 2 +- lib/shopify/fragments/product.ts | 4 +- lib/shopify/index.ts | 220 +-- lib/shopify/mutations/cart.ts | 2 +- lib/shopify/queries/cart.ts | 2 +- lib/shopify/queries/collection.ts | 4 +- lib/shopify/queries/page.ts | 2 +- lib/shopify/queries/product.ts | 8 +- lib/shopify/types.ts | 4 +- lib/type-guards.ts | 10 +- lib/utils.ts | 22 +- next.config.ts | 16 +- pnpm-lock.yaml | 1277 +++++++++++------ postcss.config.mjs | 4 +- 66 files changed, 1598 insertions(+), 1105 deletions(-) diff --git a/app/[page]/layout.tsx b/app/[page]/layout.tsx index 50614b5b1..d76dedda1 100644 --- a/app/[page]/layout.tsx +++ b/app/[page]/layout.tsx @@ -1,4 +1,4 @@ -import Footer from 'components/layout/footer'; +import Footer from "components/layout/footer"; export default function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/app/[page]/opengraph-image.tsx b/app/[page]/opengraph-image.tsx index 031e73fc8..5f11d802b 100644 --- a/app/[page]/opengraph-image.tsx +++ b/app/[page]/opengraph-image.tsx @@ -1,5 +1,5 @@ -import OpengraphImage from 'components/opengraph-image'; -import { getPage } from 'lib/shopify'; +import OpengraphImage from "components/opengraph-image"; +import { getPage } from "lib/shopify"; export default async function Image({ params }: { params: { page: string } }) { const page = await getPage(params.page); diff --git a/app/[page]/page.tsx b/app/[page]/page.tsx index aa0c15603..1740bede3 100644 --- a/app/[page]/page.tsx +++ b/app/[page]/page.tsx @@ -1,8 +1,8 @@ -import type { Metadata } from 'next'; +import type { Metadata } from "next"; -import Prose from 'components/prose'; -import { getPage } from 'lib/shopify'; -import { notFound } from 'next/navigation'; +import Prose from "components/prose"; +import { getPage } from "lib/shopify"; +import { notFound } from "next/navigation"; export async function generateMetadata(props: { params: Promise<{ page: string }>; @@ -18,12 +18,14 @@ export async function generateMetadata(props: { openGraph: { publishedTime: page.createdAt, modifiedTime: page.updatedAt, - type: 'article' - } + type: "article", + }, }; } -export default async function Page(props: { params: Promise<{ page: string }> }) { +export default async function Page(props: { + params: Promise<{ page: string }>; +}) { const params = await props.params; const page = await getPage(params.page); @@ -34,11 +36,14 @@ export default async function Page(props: { params: Promise<{ page: string }> })

{page.title}

- {`This document was last updated on ${new Intl.DateTimeFormat(undefined, { - year: 'numeric', - month: 'long', - day: 'numeric' - }).format(new Date(page.updatedAt))}.`} + {`This document was last updated on ${new Intl.DateTimeFormat( + undefined, + { + year: "numeric", + month: "long", + day: "numeric", + }, + ).format(new Date(page.updatedAt))}.`}

); diff --git a/app/api/revalidate/route.ts b/app/api/revalidate/route.ts index 4ecc0b45d..e146fa0b5 100644 --- a/app/api/revalidate/route.ts +++ b/app/api/revalidate/route.ts @@ -1,5 +1,5 @@ -import { revalidate } from 'lib/shopify'; -import { NextRequest, NextResponse } from 'next/server'; +import { revalidate } from "lib/shopify"; +import { NextRequest, NextResponse } from "next/server"; export async function POST(req: NextRequest): Promise { return revalidate(req); diff --git a/app/error.tsx b/app/error.tsx index 80b32a42a..817ef75c2 100644 --- a/app/error.tsx +++ b/app/error.tsx @@ -1,12 +1,12 @@ -'use client'; +"use client"; export default function Error({ reset }: { reset: () => void }) { return (

Oh no!

- There was an issue with our storefront. This could be a temporary issue, please try your - action again. + There was an issue with our storefront. This could be a temporary issue, + please try your action again.