-
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.
- Loading branch information
1 parent
fbff023
commit a7553ce
Showing
16 changed files
with
450 additions
and
282 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
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 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,43 @@ | ||
import {defer} from '@shopify/remix-oxygen'; | ||
import {Await, useLoaderData, Link} from '@remix-run/react'; | ||
import {Suspense} from 'react'; | ||
import {Image, Money} from '@shopify/hydrogen'; | ||
import Hero from './sections/hero'; | ||
import BestSellers from './sections/best-sellers'; | ||
import Collections from './sections/collections'; | ||
import FeaturedProducts from './sections/featured-products'; | ||
import OurPromise from './sections/our-promise'; | ||
|
||
/** | ||
* @type {MetaFunction} | ||
*/ | ||
export const meta = () => { | ||
return [{title: 'Hydrogen | Home'}]; | ||
}; | ||
|
||
/** | ||
* @param {LoaderFunctionArgs} | ||
*/ | ||
export async function loader({context: {storefront}}) { | ||
return null; | ||
} | ||
|
||
export default function Homepage() { | ||
/** @type {LoaderReturnData} */ | ||
const data = useLoaderData(); | ||
return ( | ||
<> | ||
<Hero /> | ||
<BestSellers /> | ||
<Collections /> | ||
<FeaturedProducts /> | ||
<OurPromise /> | ||
</> | ||
); | ||
} | ||
|
||
/** @typedef {import('@shopify/remix-oxygen').LoaderFunctionArgs} LoaderFunctionArgs */ | ||
/** @template T @typedef {import('@remix-run/react').MetaFunction<T>} MetaFunction */ | ||
/** @typedef {import('storefrontapi.generated').FeaturedCollectionFragment} FeaturedCollectionFragment */ | ||
/** @typedef {import('storefrontapi.generated').RecommendedProductsQuery} RecommendedProductsQuery */ | ||
/** @typedef {import('@shopify/remix-oxygen').SerializeFrom<typeof loader>} LoaderReturnData */ |
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,26 @@ | ||
import {ProductCard} from '@h2/ProductCard'; | ||
import {Heading} from '@h2/Text'; | ||
import {Container, Grid, Section} from '@h2/new/Layout'; | ||
|
||
export default function BestSellers() { | ||
return ( | ||
<Section className="py-32"> | ||
<Container as="header"> | ||
<Heading className="flex justify-between w-full -mb-6 uppercase max-w-none text-7xl"> | ||
<span>Best</span> | ||
<span>Sellers</span> | ||
</Heading> | ||
</Container> | ||
<Container> | ||
<Grid columns={12} rows={12} className="aspect-[4/6]"> | ||
<ProductCard className="col-span-5 col-start-1 row-start-1" /> | ||
<ProductCard className="col-span-3 col-start-7 row-start-3" /> | ||
<ProductCard className="col-span-3 col-start-10 row-start-1" /> | ||
<ProductCard className="col-span-3 col-start-1 row-start-9" /> | ||
<ProductCard className="col-span-3 col-start-5 row-start-7" /> | ||
<ProductCard className="col-span-4 col-start-9 row-start-8" /> | ||
</Grid> | ||
</Container> | ||
</Section> | ||
); | ||
} |
Oops, something went wrong.