From 9199e3e57d123acdcb0113ad3f057ad610171f68 Mon Sep 17 00:00:00 2001 From: archer <545436317@qq.com> Date: Tue, 2 May 2023 17:28:23 +0800 Subject: [PATCH] fix: userquery cache --- src/pages/model/share/components/list.tsx | 7 ++++--- src/pages/model/share/index.tsx | 2 +- src/pages/openapi/index.tsx | 3 +-- src/pages/promotion/index.tsx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/model/share/components/list.tsx b/src/pages/model/share/components/list.tsx index e49fd2e7b..5a259fb6e 100644 --- a/src/pages/model/share/components/list.tsx +++ b/src/pages/model/share/components/list.tsx @@ -17,7 +17,8 @@ const ShareModelList = ({ return ( <> {models.map((model) => ( - - + {model.share.intro || '这个模型没有介绍~'} @@ -74,7 +75,7 @@ const ShareModelList = ({ )} - + ))} ); diff --git a/src/pages/model/share/index.tsx b/src/pages/model/share/index.tsx index 653103f8a..d63b803e9 100644 --- a/src/pages/model/share/index.tsx +++ b/src/pages/model/share/index.tsx @@ -23,7 +23,7 @@ const modelList = () => { }); const { data: collectionModels = [], refetch: refetchCollection } = useQuery( - [getCollectionModels], + ['getCollectionModels'], getCollectionModels ); diff --git a/src/pages/openapi/index.tsx b/src/pages/openapi/index.tsx index ab17b2fa0..98f786049 100644 --- a/src/pages/openapi/index.tsx +++ b/src/pages/openapi/index.tsx @@ -1,5 +1,4 @@ import React, { useState } from 'react'; -import Link from 'next/link'; import { Card, Box, @@ -32,7 +31,7 @@ const OpenApi = () => { data: apiKeys = [], isLoading: isGetting, refetch - } = useQuery([getOpenApiKeys], getOpenApiKeys); + } = useQuery(['getOpenApiKeys'], getOpenApiKeys); const [apiKey, setApiKey] = useState(''); const { copyData } = useCopyData(); diff --git a/src/pages/promotion/index.tsx b/src/pages/promotion/index.tsx index 2563700dd..a826de7ec 100644 --- a/src/pages/promotion/index.tsx +++ b/src/pages/promotion/index.tsx @@ -47,7 +47,7 @@ const OpenApi = () => { useQuery(['init'], initUserInfo); const { data: { invitedAmount = 0, historyAmount = 0, residueAmount = 0 } = {} } = useQuery( - ['getInvitedCountAmount'], + ['getPromotionInitData'], getPromotionInitData );