diff --git a/360/layout/navbar/mobile-menu.tsx b/.components/layout/navbar/mobile-menu.tsx
similarity index 100%
rename from 360/layout/navbar/mobile-menu.tsx
rename to .components/layout/navbar/mobile-menu.tsx
diff --git a/360/layout/navbar/search.tsx b/.components/layout/navbar/search.tsx
similarity index 100%
rename from 360/layout/navbar/search.tsx
rename to .components/layout/navbar/search.tsx
diff --git a/360/layout/product-grid-items.tsx b/.components/layout/product-grid-items.tsx
similarity index 100%
rename from 360/layout/product-grid-items.tsx
rename to .components/layout/product-grid-items.tsx
diff --git a/360/layout/search/collections.tsx b/.components/layout/search/collections.tsx
similarity index 100%
rename from 360/layout/search/collections.tsx
rename to .components/layout/search/collections.tsx
diff --git a/360/layout/search/filter/dropdown.tsx b/.components/layout/search/filter/dropdown.tsx
similarity index 100%
rename from 360/layout/search/filter/dropdown.tsx
rename to .components/layout/search/filter/dropdown.tsx
diff --git a/360/layout/search/filter/index.tsx b/.components/layout/search/filter/index.tsx
similarity index 100%
rename from 360/layout/search/filter/index.tsx
rename to .components/layout/search/filter/index.tsx
diff --git a/360/layout/search/filter/item.tsx b/.components/layout/search/filter/item.tsx
similarity index 100%
rename from 360/layout/search/filter/item.tsx
rename to .components/layout/search/filter/item.tsx
diff --git a/.components/loading-dots.tsx b/.components/loading-dots.tsx
new file mode 100644
index 000000000..10e642229
--- /dev/null
+++ b/.components/loading-dots.tsx
@@ -0,0 +1,15 @@
+import clsx from 'clsx';
+
+const dots = 'mx-[1px] inline-block h-1 w-1 animate-blink rounded-md';
+
+const LoadingDots = ({ className }: { className: string }) => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default LoadingDots;
diff --git a/.components/logo-square.tsx b/.components/logo-square.tsx
new file mode 100644
index 000000000..eccf5cba7
--- /dev/null
+++ b/.components/logo-square.tsx
@@ -0,0 +1,23 @@
+import clsx from 'clsx';
+import LogoIcon from './icons/logo';
+
+export default function LogoSquare({ size }: { size?: 'sm' | undefined }) {
+ return (
+
+
+
+ );
+}
diff --git a/.components/opengraph-image.tsx b/.components/opengraph-image.tsx
new file mode 100644
index 000000000..288e0bd50
--- /dev/null
+++ b/.components/opengraph-image.tsx
@@ -0,0 +1,40 @@
+import { ImageResponse } from 'next/og';
+import LogoIcon from './icons/logo';
+
+export type Props = {
+ title?: string;
+};
+
+export default async function OpengraphImage(props?: Props): Promise
{
+ const { title } = {
+ ...{
+ title: process.env.SITE_NAME
+ },
+ ...props
+ };
+
+ return new ImageResponse(
+ (
+
+ ),
+ {
+ width: 1200,
+ height: 630,
+ fonts: [
+ {
+ name: 'Inter',
+ data: await fetch(new URL('../fonts/Inter-Bold.ttf', import.meta.url)).then((res) =>
+ res.arrayBuffer()
+ ),
+ style: 'normal',
+ weight: 700
+ }
+ ]
+ }
+ );
+}
diff --git a/.components/price.tsx b/.components/price.tsx
new file mode 100644
index 000000000..e7090148d
--- /dev/null
+++ b/.components/price.tsx
@@ -0,0 +1,24 @@
+import clsx from 'clsx';
+
+const Price = ({
+ amount,
+ className,
+ currencyCode = 'USD',
+ currencyCodeClassName
+}: {
+ amount: string;
+ className?: string;
+ currencyCode: string;
+ currencyCodeClassName?: string;
+} & React.ComponentProps<'p'>) => (
+
+ {`${new Intl.NumberFormat(undefined, {
+ style: 'currency',
+ currency: currencyCode,
+ currencyDisplay: 'narrowSymbol'
+ }).format(parseFloat(amount))}`}
+ {`${currencyCode}`}
+
+);
+
+export default Price;
diff --git a/.components/product/gallery.tsx b/.components/product/gallery.tsx
new file mode 100644
index 000000000..0b03557a5
--- /dev/null
+++ b/.components/product/gallery.tsx
@@ -0,0 +1,99 @@
+'use client';
+
+import { ArrowLeftIcon, ArrowRightIcon } from '@heroicons/react/24/outline';
+import { GridTileImage } from 'components/grid/tile';
+import { createUrl } from 'lib/utils';
+import Image from 'next/image';
+import Link from 'next/link';
+import { usePathname, useSearchParams } from 'next/navigation';
+
+export function Gallery({ images }: { images: { src: string; altText: string }[] }) {
+ const pathname = usePathname();
+ const searchParams = useSearchParams();
+ const imageSearchParam = searchParams.get('image');
+ const imageIndex = imageSearchParam ? parseInt(imageSearchParam) : 0;
+
+ const nextSearchParams = new URLSearchParams(searchParams.toString());
+ const nextImageIndex = imageIndex + 1 < images.length ? imageIndex + 1 : 0;
+ nextSearchParams.set('image', nextImageIndex.toString());
+ const nextUrl = createUrl(pathname, nextSearchParams);
+
+ const previousSearchParams = new URLSearchParams(searchParams.toString());
+ const previousImageIndex = imageIndex === 0 ? images.length - 1 : imageIndex - 1;
+ previousSearchParams.set('image', previousImageIndex.toString());
+ const previousUrl = createUrl(pathname, previousSearchParams);
+
+ const buttonClassName =
+ 'h-full px-6 transition-all ease-in-out hover:scale-110 hover:text-black dark:hover:text-white flex items-center justify-center';
+
+ return (
+ <>
+
+ {images[imageIndex] && (
+
+ )}
+
+ {images.length > 1 ? (
+
+ ) : null}
+
+
+ {images.length > 1 ? (
+
+ {images.map((image, index) => {
+ const isActive = index === imageIndex;
+ const imageSearchParams = new URLSearchParams(searchParams.toString());
+
+ imageSearchParams.set('image', index.toString());
+
+ return (
+
+
+
+
+
+ );
+ })}
+
+ ) : null}
+ >
+ );
+}
diff --git a/.components/product/product-description.tsx b/.components/product/product-description.tsx
new file mode 100644
index 000000000..10232ae3d
--- /dev/null
+++ b/.components/product/product-description.tsx
@@ -0,0 +1,36 @@
+import { AddToCart } from 'components/cart/add-to-cart';
+import Price from 'components/price';
+import Prose from 'components/prose';
+import { Product } from 'lib/shopify/types';
+import { Suspense } from 'react';
+import { VariantSelector } from './variant-selector';
+
+export function ProductDescription({ product }: { product: Product }) {
+ return (
+ <>
+
+
+
+
+
+ {product.descriptionHtml ? (
+
+ ) : null}
+
+
+
+
+ >
+ );
+}
diff --git a/.components/product/variant-selector.tsx b/.components/product/variant-selector.tsx
new file mode 100644
index 000000000..9d47eb5c8
--- /dev/null
+++ b/.components/product/variant-selector.tsx
@@ -0,0 +1,106 @@
+'use client';
+
+import clsx from 'clsx';
+import { ProductOption, ProductVariant } from 'lib/shopify/types';
+import { createUrl } from 'lib/utils';
+import { usePathname, useRouter, useSearchParams } from 'next/navigation';
+
+type Combination = {
+ id: string;
+ availableForSale: boolean;
+ [key: string]: string | boolean; // ie. { color: 'Red', size: 'Large', ... }
+};
+
+export function VariantSelector({
+ options,
+ variants
+}: {
+ options: ProductOption[];
+ variants: ProductVariant[];
+}) {
+ const router = useRouter();
+ const pathname = usePathname();
+ const searchParams = useSearchParams();
+ const hasNoOptionsOrJustOneOption =
+ !options.length || (options.length === 1 && options[0]?.values.length === 1);
+
+ if (hasNoOptionsOrJustOneOption) {
+ return null;
+ }
+
+ const combinations: Combination[] = variants.map((variant) => ({
+ id: variant.id,
+ availableForSale: variant.availableForSale,
+ // Adds key / value pairs for each variant (ie. "color": "Black" and "size": 'M").
+ ...variant.selectedOptions.reduce(
+ (accumulator, option) => ({ ...accumulator, [option.name.toLowerCase()]: option.value }),
+ {}
+ )
+ }));
+
+ return options.map((option) => (
+
+ {option.name}
+
+ {option.values.map((value) => {
+ const optionNameLowerCase = option.name.toLowerCase();
+
+ // Base option params on current params so we can preserve any other param state in the url.
+ const optionSearchParams = new URLSearchParams(searchParams.toString());
+
+ // Update the option params using the current option to reflect how the url *would* change,
+ // if the option was clicked.
+ optionSearchParams.set(optionNameLowerCase, value);
+ const optionUrl = createUrl(pathname, optionSearchParams);
+
+ // In order to determine if an option is available for sale, we need to:
+ //
+ // 1. Filter out all other param state
+ // 2. Filter out invalid options
+ // 3. Check if the option combination is available for sale
+ //
+ // This is the "magic" that will cross check possible variant combinations and preemptively
+ // disable combinations that are not available. For example, if the color gray is only available in size medium,
+ // then all other sizes should be disabled.
+ const filtered = Array.from(optionSearchParams.entries()).filter(([key, value]) =>
+ options.find(
+ (option) => option.name.toLowerCase() === key && option.values.includes(value)
+ )
+ );
+ const isAvailableForSale = combinations.find((combination) =>
+ filtered.every(
+ ([key, value]) => combination[key] === value && combination.availableForSale
+ )
+ );
+
+ // The option is active if it's in the url params.
+ const isActive = searchParams.get(optionNameLowerCase) === value;
+
+ return (
+ {
+ router.replace(optionUrl, { scroll: false });
+ }}
+ title={`${option.name} ${value}${!isAvailableForSale ? ' (Out of Stock)' : ''}`}
+ className={clsx(
+ 'flex min-w-[48px] items-center justify-center rounded-full border bg-neutral-100 px-2 py-1 text-sm dark:border-neutral-800 dark:bg-neutral-900',
+ {
+ 'cursor-default ring-2 ring-blue-600': isActive,
+ 'ring-1 ring-transparent transition duration-300 ease-in-out hover:scale-110 hover:ring-blue-600 ':
+ !isActive && isAvailableForSale,
+ 'relative z-10 cursor-not-allowed overflow-hidden bg-neutral-100 text-neutral-500 ring-1 ring-neutral-300 before:absolute before:inset-x-0 before:-z-10 before:h-px before:-rotate-45 before:bg-neutral-300 before:transition-transform dark:bg-neutral-900 dark:text-neutral-400 dark:ring-neutral-700 before:dark:bg-neutral-700':
+ !isAvailableForSale
+ }
+ )}
+ >
+ {value}
+
+ );
+ })}
+
+
+ ));
+}
diff --git a/.components/prose.tsx b/.components/prose.tsx
new file mode 100644
index 000000000..f910d2296
--- /dev/null
+++ b/.components/prose.tsx
@@ -0,0 +1,21 @@
+import clsx from 'clsx';
+import type { FunctionComponent } from 'react';
+
+interface TextProps {
+ html: string;
+ className?: string;
+}
+
+const Prose: FunctionComponent = ({ html, className }) => {
+ return (
+
+ );
+};
+
+export default Prose;