Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update SFCC example to use TypeScript +
@next/font
(#42865)
This is now ready for review. Co-authored-by: Hassan El Mghari <hassan4709@gmail.com>
- Loading branch information
Showing
15 changed files
with
83 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export default function Footer() { | ||
return ( | ||
<footer className="center mt-5 flex justify-center space-x-4 bg-[#E7E8EF] p-4 text-xs"> | ||
<p>Powered by Next.js, Salesforce Commerce Cloud, and Vercel </p> | ||
<span>|</span> | ||
<a | ||
href="https://github.com/vercel/next.js/tree/canary/examples/with-sfcc" | ||
className="font-medium text-orange-600" | ||
> | ||
Source code | ||
</a> | ||
</footer> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
reactStrictMode: true, | ||
images: { | ||
domains: ['zzte-003.sandbox.us02.dx.commercecloud.salesforce.com'], | ||
domains: ['zzte-003.dx.commercecloud.salesforce.com'], | ||
}, | ||
} |
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,23 @@ | ||
import '../styles/globals.css' | ||
import Footer from '../components/Footer' | ||
import Head from 'next/head' | ||
import { Montserrat } from '@next/font/google' | ||
|
||
const montserrat = Montserrat({ | ||
subsets: ['latin'], | ||
variable: '--font-montserrat', | ||
}) | ||
|
||
export default function MyApp({ Component, pageProps }) { | ||
return ( | ||
<> | ||
<Head> | ||
<title>The Coffee House</title> | ||
</Head> | ||
<main className={`${montserrat.variable} font-sans`}> | ||
<Component {...pageProps} /> | ||
<Footer /> | ||
</main> | ||
</> | ||
) | ||
} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
* { | ||
font-family: Montserrat, sans-serif; | ||
} |
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 |
---|---|---|
@@ -1,7 +1,16 @@ | ||
/** @type {import('tailwindcss').Config} \*/ | ||
module.exports = { | ||
content: [ | ||
'./pages/**/*.{js,ts,jsx,tsx}', | ||
'./components/**/*.{js,ts,jsx,tsx}', | ||
], | ||
theme: { | ||
fontFamily: { | ||
sans: ['var(--font-montserrat)'], | ||
}, | ||
}, | ||
future: { | ||
hoverOnlyWhenSupported: true, | ||
}, | ||
plugins: [require('@tailwindcss/aspect-ratio')], | ||
} |
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,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"incremental": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve" | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |