Skip to content

Commit

Permalink
fix search bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ceddybi committed Jan 31, 2024
1 parent 9e9d093 commit 29c1859
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/app/questions/list.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
import { Answer, QuestionAnswer } from "./interfaces";
import {
Badge,
BadgeDelta,
Bold,
Card,
Col,
Flex,
Grid,
List,
ListItem,
Metric,
Text,
Textarea,
Title,
} from "@tremor/react";
import { isEmpty, sortBy, uniq, uniqBy } from "lodash";

import {
ClockIcon,
CogIcon,
MagnifyingGlassIcon,
MinusCircleIcon,
ShoppingCartIcon,
} from "@heroicons/react/20/solid";
import { isEmpty, sortBy, uniq, uniqBy } from "lodash";

import React from "react";
import _get from "lodash/get";

Expand Down Expand Up @@ -270,7 +262,7 @@ export const ListQuestions = () => {

React.useEffect(() => {
getAllQuestions();
}, [search]);
}, []);

const handleSaveQuestion = async () => {
const questionToSave = { ...selectedQuestion, isNew: false };
Expand Down Expand Up @@ -347,11 +339,7 @@ export const ListQuestions = () => {
}`}
>
<Title className="truncate">{item.question.question}</Title>
{item.isNew && (
<Text>
<Badge>New</Badge>{" "}
</Text>
)}
{item.isNew && <Badge>New</Badge>}
</ListItem>
);
})}
Expand Down

0 comments on commit 29c1859

Please sign in to comment.