initial commit

This commit is contained in:
Matthias
2026-06-15 11:33:23 +02:00
commit fc0a6fb975
155 changed files with 24526 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import { useEffect, useRef } from "react";
import { useMutation } from "convex/react";
import { api } from "../../convex/_generated/api";
/** Legt Standard-Kategorien an, sobald die Auth-Session am Client aktiv ist. */
export function SeedInitializer() {
const ensureSeeded = useMutation(api.users.ensureSeeded);
const ran = useRef(false);
useEffect(() => {
if (ran.current) return;
ran.current = true;
void ensureSeeded({}).catch((error) => {
ran.current = false;
console.error("ensureSeeded fehlgeschlagen:", error);
});
}, [ensureSeeded]);
return null;
}