Skip to content

Commit

Permalink
has bug in tag selection, waiting for backend update. Fixed more fron…
Browse files Browse the repository at this point in the history
…tend test fails.
  • Loading branch information
NazireAta committed Dec 13, 2024
1 parent 78a045c commit 85a5224
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/routes/question.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default function QuestionPage() {
const titleRef = useRef<HTMLInputElement>(null);
const contentRef = useRef<HTMLTextAreaElement>(null);

const [content, setContent] = useState(question.content || ""); // Controlled content state
const [tags, setTags] = useState<number[]>(question.tags?.map((tag) => Number(tag.id)) || []); // Tag IDs state
const [availableTags, setAvailableTags] = useState<{ tagId: string; name: string }[]>([]); // Available tags

Expand Down Expand Up @@ -140,7 +139,7 @@ export default function QuestionPage() {
description: "The question has been updated successfully.",
});
setIsEditing(false);
} catch (err) {
} catch (_) {
toast({

Check failure on line 143 in frontend/src/routes/question.tsx

View workflow job for this annotation

GitHub Actions / Frontend Tests

'_' is defined but never used
variant: "destructive",
title: "Failed to save changes",
Expand Down

0 comments on commit 85a5224

Please sign in to comment.