diff --git a/package-lock.json b/package-lock.json index 798766a..918dc7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@headlessui/react": "^2.1.8", "@next/third-parties": "^14.2.13", + "canvas-confetti": "^1.9.3", "@notion-render/bookmark-plugin": "^0.0.2", "@notion-render/client": "^0.0.2", "@notion-render/hljs-plugin": "^0.0.2", @@ -1907,6 +1908,15 @@ ], "license": "CC-BY-4.0" }, + "node_modules/canvas-confetti": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/canvas-confetti/-/canvas-confetti-1.9.3.tgz", + "integrity": "sha512-rFfTURMvmVEX1gyXFgn5QMn81bYk70qa0HLzcIOSVEyl57n6o9ItHeBtUSWdvKAPY0xlvBHno4/v3QPrT83q9g==", + "funding": { + "type": "donate", + "url": "https://www.paypal.me/kirilvatev" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", diff --git a/package.json b/package.json index 311d8c0..8e746cc 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "@headlessui/react": "^2.1.8", "@next/third-parties": "^14.2.13", + "canvas-confetti": "^1.9.3", "@notion-render/bookmark-plugin": "^0.0.2", "@notion-render/client": "^0.0.2", "@notion-render/hljs-plugin": "^0.0.2", diff --git a/src/app/obrigado/page.tsx b/src/app/obrigado/page.tsx new file mode 100644 index 0000000..5f795d9 --- /dev/null +++ b/src/app/obrigado/page.tsx @@ -0,0 +1,51 @@ +'use client' + +import React, { useEffect } from 'react' +import Link from 'next/link' +// @ts-expect-error: ajuste de tipagem +import confetti from 'canvas-confetti' + +const ObrigadoPage = () => { + useEffect(() => { + const duration = 1 * 1000 // duração do efeito (1 segundo) + const end = Date.now() + duration + + const frame = () => { + confetti({ + particleCount: 4, // quantidade de partículas + spread: 60, // sobe mais reto + startVelocity: 90, // aumenta a força para subir mais alto + origin: { + x: Math.random(), // posição horizontal aleatória + y: 1, // começa do rodapé + }, + }) + + if (Date.now() < end) { + requestAnimationFrame(frame) + } + } + + frame() + }, []) + + return ( +
+ Parabéns pelo seu primeiro passo!
Em breve, novidades no seu email 🚀
+
{heroDetails.subheading}
+ + {/* FORMULÁRIO DA WAITLIST AQUI */} +