fix: userquery cache
This commit is contained in:
parent
89234c197c
commit
9199e3e57d
@ -17,7 +17,8 @@ const ShareModelList = ({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{models.map((model) => (
|
{models.map((model) => (
|
||||||
<Box
|
<Flex
|
||||||
|
flexDirection={'column'}
|
||||||
key={model._id}
|
key={model._id}
|
||||||
p={4}
|
p={4}
|
||||||
border={'1px solid'}
|
border={'1px solid'}
|
||||||
@ -36,7 +37,7 @@ const ShareModelList = ({
|
|||||||
{model.name}
|
{model.name}
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Box className={styles.intro} my={4} fontSize={'sm'} color={'blackAlpha.600'}>
|
<Box flex={1} className={styles.intro} my={4} fontSize={'sm'} color={'blackAlpha.600'}>
|
||||||
{model.share.intro || '这个模型没有介绍~'}
|
{model.share.intro || '这个模型没有介绍~'}
|
||||||
</Box>
|
</Box>
|
||||||
<Flex justifyContent={'space-between'}>
|
<Flex justifyContent={'space-between'}>
|
||||||
@ -74,7 +75,7 @@ const ShareModelList = ({
|
|||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Box>
|
</Flex>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ const modelList = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { data: collectionModels = [], refetch: refetchCollection } = useQuery(
|
const { data: collectionModels = [], refetch: refetchCollection } = useQuery(
|
||||||
[getCollectionModels],
|
['getCollectionModels'],
|
||||||
getCollectionModels
|
getCollectionModels
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import Link from 'next/link';
|
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
Box,
|
Box,
|
||||||
@ -32,7 +31,7 @@ const OpenApi = () => {
|
|||||||
data: apiKeys = [],
|
data: apiKeys = [],
|
||||||
isLoading: isGetting,
|
isLoading: isGetting,
|
||||||
refetch
|
refetch
|
||||||
} = useQuery([getOpenApiKeys], getOpenApiKeys);
|
} = useQuery(['getOpenApiKeys'], getOpenApiKeys);
|
||||||
const [apiKey, setApiKey] = useState('');
|
const [apiKey, setApiKey] = useState('');
|
||||||
const { copyData } = useCopyData();
|
const { copyData } = useCopyData();
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ const OpenApi = () => {
|
|||||||
|
|
||||||
useQuery(['init'], initUserInfo);
|
useQuery(['init'], initUserInfo);
|
||||||
const { data: { invitedAmount = 0, historyAmount = 0, residueAmount = 0 } = {} } = useQuery(
|
const { data: { invitedAmount = 0, historyAmount = 0, residueAmount = 0 } = {} } = useQuery(
|
||||||
['getInvitedCountAmount'],
|
['getPromotionInitData'],
|
||||||
getPromotionInitData
|
getPromotionInitData
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user