fix: timline show votes condition

This commit is contained in:
shuai 2022-11-28 18:46:56 +08:00
parent 68879eb4cf
commit 71f8a21032
1 changed files with 4 additions and 4 deletions

View File

@ -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 = '';