p 1 and 2 compeleted
This commit is contained in:
1 parent
6adb541967
commit
3573709d99
28 files changed
+2533
-240
No files matched your search
@@ -4,6 +4,7 @@ import { useState, useEffect } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardHeader, CardContent } from "@/components/ui/card";
|
||||
import log from "@/lib/logger";
|
||||
import { toast } from "@/lib/toast";
|
||||
|
||||
interface Recommendation {
|
||||
id: string;
|
||||
@@ -63,8 +64,9 @@ export function Recommendations({ userId }: RecommendationsProps) {
|
||||
if (response.ok) {
|
||||
setNewRec({ ...newRec, content: "" });
|
||||
fetchRecommendations();
|
||||
toast.success("Recommendation added successfully");
|
||||
} else {
|
||||
alert("Failed to add recommendation");
|
||||
toast.error("Failed to add recommendation");
|
||||
}
|
||||
} catch (error) {
|
||||
log.error("Failed to add recommendation", error);
|
||||
|
||||
Reference in new issue
Block a user