-
Notifications
You must be signed in to change notification settings - Fork 21
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
560ee3b
commit 8a6495f
Showing
12 changed files
with
1,612 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# vercel-commerce uses a different react version | ||
# and the build work break when symlinks are used | ||
# See https://stackoverflow.com/a/65638449 | ||
node-linker=hoisted |
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 |
---|---|---|
|
@@ -36,3 +36,8 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# cf | ||
.dev.vars | ||
.wrangler | ||
.worker-next |
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
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,35 +1,9 @@ | ||
'use client'; | ||
|
||
import { useEffect } from 'react'; | ||
import { toast } from 'sonner'; | ||
|
||
export function WelcomeToast() { | ||
useEffect(() => { | ||
// ignore if screen height is too small | ||
if (window.innerHeight < 650) return; | ||
if (!document.cookie.includes('welcome-toast=2')) { | ||
toast('🛍️ Welcome to Next.js Commerce!', { | ||
id: 'welcome-toast', | ||
duration: Infinity, | ||
onDismiss: () => { | ||
document.cookie = 'welcome-toast=2; max-age=31536000; path=/'; | ||
}, | ||
description: ( | ||
<> | ||
This is a high-performance, SSR storefront powered by Shopify, Next.js, and Vercel.{' '} | ||
<a | ||
href="https://vercel.com/templates/next.js/nextjs-commerce" | ||
className="text-blue-600 hover:underline" | ||
target="_blank" | ||
> | ||
Deploy your own | ||
</a> | ||
. | ||
</> | ||
) | ||
}); | ||
} | ||
}, []); | ||
useEffect(() => {}, []); | ||
|
||
return null; | ||
} |
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
Oops, something went wrong.