MCPcopy Create free account
hub / github.com/code100x/daily-code / handleCreateProblem

Function handleCreateProblem

apps/web/components/admin/AddProblemCard.tsx:37–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 const { toast } = useToast();
36
37 const handleCreateProblem = async () => {
38 const problem = await createProblem({ title, description, type, notionDocId });
39 if (problem) {
40 newProblems.push(problem);
41 toast({
42 title: "Added problem",
43 description: "Problem added",
44 });
45 return;
46 }
47
48 toast({
49 title: "Couldn't add problem",
50 description: "Please try again later",
51 });
52 };
53
54 return (
55 <div>

Callers

nothing calls this directly

Calls 2

createProblemFunction · 0.90
toastFunction · 0.85

Tested by

no test coverage detected