mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 19:51:23 +00:00
updates
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import pageTemplates from "components/agility-pageTemplates"
|
||||
import Head from 'next/head'
|
||||
import { Text } from '@components/ui'
|
||||
|
||||
const AgilityPage = ({ agilityProps, error, revalidate }: { agilityProps: any, error?: any, revalidate?: any }) => {
|
||||
|
||||
@@ -18,9 +19,14 @@ const AgilityPage = ({ agilityProps, error, revalidate }: { agilityProps: any, e
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Page Not Found - {pageTitle}</title>
|
||||
<title>Page Not Found - {pageTitle}</title>
|
||||
</Head>
|
||||
<div className="m-8 text-center" >Page not found.</div>
|
||||
<div className="max-w-2xl mx-8 sm:mx-auto py-20 flex flex-col items-center justify-center fit">
|
||||
<Text variant="heading">Not Found</Text>
|
||||
<Text className="">
|
||||
The requested page doesn't exist or you don't have access to it.
|
||||
</Text>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -37,6 +43,9 @@ const AgilityPage = ({ agilityProps, error, revalidate }: { agilityProps: any, e
|
||||
<>
|
||||
<Head>
|
||||
<title>{agilityProps.sitemapNode?.title} - {pageTitle}</title>
|
||||
<meta name="description" content={agilityProps.page?.seo?.metaDescription} />
|
||||
<meta name="generator" content="Agility CMS" />
|
||||
<meta name="agility_timestamp" content={new Date().toLocaleString()} />
|
||||
</Head>
|
||||
<AgilityPageTemplate {...agilityProps} />
|
||||
</>
|
||||
|
@@ -22,23 +22,27 @@ const Footer: FC<Props> = ({ className, pages, agilityProps }) => {
|
||||
const { sitePages } = usePages(pages)
|
||||
const rootClassName = cn(s.root, className)
|
||||
|
||||
const siteData = agilityProps.globalData["sitedata"]
|
||||
const siteData = agilityProps?.globalData["sitedata"] || null
|
||||
|
||||
const agilityLinks = siteData?.links || []
|
||||
|
||||
return (
|
||||
<footer className={rootClassName}>
|
||||
<Container>
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 border-b border-accent-2 py-12 text-primary bg-primary transition-colors duration-150">
|
||||
<div className="col-span-1 lg:col-span-2">
|
||||
<Link href="/">
|
||||
<a className="flex flex-initial items-center font-bold md:mr-24 ">
|
||||
<img src={siteData.logo.url} height="32" width="32" className="rounded-full border border-accent-6 mr-2" />
|
||||
<span>{siteData.name}</span>
|
||||
</a>
|
||||
</Link>
|
||||
{ siteData &&
|
||||
<Link href="/">
|
||||
<a className="flex flex-initial items-center font-bold md:mr-24 ">
|
||||
<img src={siteData.logo.url} height="32" width="32" className="rounded-full border border-accent-6 mr-2" />
|
||||
<span>{siteData.name}</span>
|
||||
</a>
|
||||
</Link>
|
||||
}
|
||||
</div>
|
||||
<div className="col-span-1 lg:col-span-8">
|
||||
<div className="grid md:grid-rows-4 md:grid-cols-3 md:grid-flow-col">
|
||||
{[...links, ...sitePages, ...siteData.links].map((page) => (
|
||||
{[...links, ...sitePages, ...agilityLinks].map((page) => (
|
||||
<span key={page.url} className="py-3 md:py-0 md:pb-4">
|
||||
<Link href={page.url!}>
|
||||
<a className="text-accent-9 hover:text-accent-6 transition ease-in-out duration-150">
|
||||
|
@@ -6,7 +6,7 @@ import config from '@config/seo.json'
|
||||
const Head: FC = () => {
|
||||
return (
|
||||
<>
|
||||
<DefaultSeo {...config} />
|
||||
{/* MOD - JOEL VARTY - this is set in the AgilityPage.tsx component <DefaultSeo {...config} /> */}
|
||||
<NextHead>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="manifest" href="/site.webmanifest" key="site-manifest" />
|
||||
|
@@ -16,18 +16,20 @@ interface NavbarProps {
|
||||
|
||||
const Navbar: FC<NavbarProps> = ({ links, agilityProps }) => {
|
||||
|
||||
const siteData = agilityProps.globalData["sitedata"]
|
||||
const siteData = agilityProps?.globalData["sitedata"] || null
|
||||
|
||||
return (
|
||||
<NavbarRoot>
|
||||
<Container>
|
||||
<div className={s.nav}>
|
||||
<div className="flex items-center flex-1">
|
||||
<Link href="/">
|
||||
<a className={s.logo} aria-label="Logo">
|
||||
<img src={siteData.logo.url} alt={siteData.logo.label} height="32" width="32" className="rounded-full border border-accent-6" />
|
||||
</a>
|
||||
</Link>
|
||||
{siteData &&
|
||||
<Link href="/">
|
||||
<a className={s.logo} aria-label="Logo">
|
||||
<img src={siteData.logo.url} alt={siteData.logo.label} height="32" width="32" className="rounded-full border border-accent-6" />
|
||||
</a>
|
||||
</Link>
|
||||
}
|
||||
<nav className={s.navMenu}>
|
||||
<Link href="/search">
|
||||
<a className={s.link}>All</a>
|
||||
|
Reference in New Issue
Block a user