Initial commit: WaMarket MVP
Marketplace inversée (Next.js 16 App Router + Supabase Cloud) : auth, schéma + RLS, publication de besoins avec upload d'images, feed avec filtres, offres, acceptation via RPC, messagerie temps réel, dashboards, et Dockerfile pour déploiement Coolify.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import Link from "next/link";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
export default function AuthCodeErrorPage() {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center gap-4 px-4 py-20 text-center sm:px-6 sm:py-32">
|
||||
<h1 className="text-2xl font-semibold">Lien invalide ou expiré</h1>
|
||||
<p className="max-w-sm text-muted-foreground">
|
||||
Ce lien de confirmation n'est plus valide. Réessaie de te
|
||||
connecter ou de t'inscrire.
|
||||
</p>
|
||||
<Button asChild>
|
||||
<Link href="/auth/login">Retour à la connexion</Link>
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { type EmailOtpType } from "@supabase/supabase-js";
|
||||
import { type NextRequest } from "next/server";
|
||||
import { redirect } from "next/navigation";
|
||||
import { createClient } from "@/lib/supabase/server";
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { searchParams } = new URL(request.url);
|
||||
const token_hash = searchParams.get("token_hash");
|
||||
const type = searchParams.get("type") as EmailOtpType | null;
|
||||
const next = searchParams.get("next") ?? "/dashboard/my-needs";
|
||||
|
||||
if (token_hash && type) {
|
||||
const supabase = await createClient();
|
||||
const { error } = await supabase.auth.verifyOtp({ type, token_hash });
|
||||
if (!error) {
|
||||
redirect(next);
|
||||
}
|
||||
}
|
||||
|
||||
redirect("/auth/auth-code-error");
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { LoginForm } from "@/components/auth/login-form";
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
<div className="flex items-center justify-center px-4 py-16 sm:px-6 sm:py-24">
|
||||
<LoginForm />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SignupForm } from "@/components/auth/signup-form";
|
||||
|
||||
export default function SignupPage() {
|
||||
return (
|
||||
<div className="flex items-center justify-center px-4 py-16 sm:px-6 sm:py-24">
|
||||
<SignupForm />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user