mirror of https://github.com/fantasticit/think.git
client: fix get collected wikis
parent
0630870d0a
commit
ae1d32931c
|
@ -31,7 +31,6 @@ export const getCollectedWikis = (cookie = null): Promise<IWikiWithIsMember[]> =
|
||||||
export const useCollectedWikis = () => {
|
export const useCollectedWikis = () => {
|
||||||
const { data, error, isLoading, refetch } = useQuery(CollectorApiDefinition.wikis.client(), getCollectedWikis, {
|
const { data, error, isLoading, refetch } = useQuery(CollectorApiDefinition.wikis.client(), getCollectedWikis, {
|
||||||
staleTime: 500,
|
staleTime: 500,
|
||||||
enabled: false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -120,10 +120,6 @@ const Page: NextPage = () => {
|
||||||
const [visible, toggleVisible] = useToggle(false);
|
const [visible, toggleVisible] = useToggle(false);
|
||||||
const { data: staredWikis, loading, error, refresh } = useCollectedWikis();
|
const { data: staredWikis, loading, error, refresh } = useCollectedWikis();
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
refresh();
|
|
||||||
}, [refresh]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SingleColumnLayout>
|
<SingleColumnLayout>
|
||||||
<Seo title="主页" />
|
<Seo title="主页" />
|
||||||
|
|
Loading…
Reference in New Issue