Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: timline show votes condition

shuai71f8a21032f3
diff --git a/ui/src/pages/Timeline/index.tsx b/ui/src/pages/Timeline/index.tsx
index 933eebd2..ae0b7c18 100644
--- a/ui/src/pages/Timeline/index.tsx
+++ b/ui/src/pages/Timeline/index.tsx
@@ -18,11 +18,11 @@ const Index: FC = () => {
const [isLoading, setLoading] = useState(false);
const [timelineData, setTimelineData] = useState<Type.TimelineRes>();
- const getPageData = () => {
+ const getPageData = (bol: boolean) => {
setLoading(true);
getTimelineData({
object_id: tid || aid || qid,
- show_vote: showVotes,
+ show_vote: bol,
})
.then((res) => {
setTimelineData(res);
@@ -34,11 +34,11 @@ const Index: FC = () => {
const handleSwitch = (bol: boolean) => {
setShowVotes(bol);
- getPageData();
+ getPageData(bol);
};
useEffect(() => {
- getPageData();
+ getPageData(false);
}, []);
let linkUrl = '';