feat: initial commit — asaas-checkout template white-label

Template genérico de checkout com ASAAS, parametrizado via env vars.
Inclui fluxo completo: checkout → pedido → polling → webhook → admin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 06:40:41 +02:00
commit 038ce3f556
103 changed files with 20709 additions and 0 deletions

25
components/auth-guard.tsx Normal file
View File

@@ -0,0 +1,25 @@
"use client"
import { useEffect } from "react"
import { useRouter } from "next/navigation"
import { useToast } from "@/components/ui/use-toast"
import type React from "react" // Added import for React
export function AuthGuard({ children }: { children: React.ReactNode }) {
const router = useRouter()
const { toast } = useToast()
useEffect(() => {
const isLoggedIn = localStorage.getItem("isLoggedIn")
if (!isLoggedIn) {
toast({
title: "Acesso negado",
description: "Faça login para acessar a área administrativa.",
variant: "destructive",
})
router.push("/login")
}
}, [router, toast])
return <>{children}</>
}