Skip to content

Commit

Permalink
Merge pull request #8 from Solstice-Hosting/alexx-changes-0017-25042024
Browse files Browse the repository at this point in the history
Fixing [page]
  • Loading branch information
ajjswift authored Apr 24, 2024
2 parents bbfcb65 + 3201eb0 commit f07c6b2
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions pages/store/[page].js
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,38 @@ export default function StorePage({ categoryInformation, products }) {
return (
<>
<Head>
<title>{categoryInformation.categoryNameLong} - SolsticeHosting</title>
<meta name="description" content={categoryInformation.metaDescription} />
<meta name="keywords" content={categoryInformation.keywords} />
<title>{categoryInformation?.categoryNameLong} - SolsticeHosting</title>
<meta name="description" content={categoryInformation?.metaDescription} />
<meta name="keywords" content={categoryInformation?.keywords} />
</Head>
<Header />
<div className="w-full flex items-center p-12 flex-col bg-gray-950 gap-8">
<div className="flex flex-col gap-2 items-center p-4 lg:p-10 text-center">
<h1 className="font-extrabold text-5xl text-gray-100 whitespace-nowrap">
<span className="hidden lg:block">{categoryInformation.categoryWhamWord}</span>
<span className="hidden lg:block">{categoryInformation?.categoryWhamWord}</span>
<span className="bg-gradient-to-r from-orange-400 transition-all duration-200 to-purple-500 bg-clip-text text-transparent hover:saturate-150 hover:to-orange-400 hover:from-purple-500">
{categoryInformation.categoryNameLong}
{categoryInformation?.categoryNameLong}
</span>
</h1>
<span className="text-2xl text-gray-50">{categoryInformation.categoryTagline}</span>
<span className="text-2xl text-gray-50">{categoryInformation?.categoryTagline}</span>
</div>
<div className="grid grid-cols-2 lg:grid-cols-8 gap-24">
{products.map((product, index) => (
{products?.map((product, index) => (
((index + 1) % 5 === 2) ? (
<ShopSpecialCard
key={product.id}
title={product.name}
price={parseFloat(product.price).toFixed(2)}
items={product.features}
link={`https://billing.solsticehosting.co.uk/store/${categoryInformation.billingSlug}/${product.itemId}`}
key={product?.id}
title={product?.name}
price={parseFloat(product?.price).toFixed(2)}
items={product?.features}
link={`https://billing.solsticehosting.co.uk/store/${categoryInformation?.billingSlug}/${product?.itemId}`}
/>
) : (
<ShopCard
key={product.id}
title={product.name}
price={parseFloat(product.price).toFixed(2)}
items={product.features}
link={`https://billing.solsticehosting.co.uk/store/${categoryInformation.billingSlug}/${product.itemId}`}
key={product?.id}
title={product?.name}
price={parseFloat(product?.price).toFixed(2)}
items={product?.features}
link={`https://billing.solsticehosting.co.uk/store/${categoryInformation?.billingSlug}/${product?.itemId}`}
/>
)
))}
Expand All @@ -58,7 +58,7 @@ export default function StorePage({ categoryInformation, products }) {
);
}

async function getServerSideProps(context) {
export async function getServerSideProps(context) {
const pb = new PocketBase('https://pb.solsticehosting.co.uk');
const slug = context.params.page;

Expand Down

0 comments on commit f07c6b2

Please sign in to comment.