ソースを参照

Revert "fix argument types"

This reverts commit 45da2bdc443fb39c76b323b6deb2bdd6788c413e.
Shun Miyazawa 1 年間 前
コミット
7bd2018db8
1 ファイル変更2 行追加2 行削除
  1. 2 2
      apps/app/src/features/openai/client/stores/thread.tsx

+ 2 - 2
apps/app/src/features/openai/client/stores/thread.tsx

@@ -6,7 +6,7 @@ import { apiv3Get } from '~/client/util/apiv3-client';
 
 import type { IThreadRelationHasId } from '../../interfaces/thread-relation';
 
-const getKey = (aiAssistantId?: string) => (aiAssistantId != null ? [`/openai/threads/${aiAssistantId}`] : null);
+const getKey = (aiAssistantId: string) => [`/openai/threads/${aiAssistantId}`];
 
 export const useSWRxThreads = (aiAssistantId: string): SWRResponse<IThreadRelationHasId[], Error> => {
   const key = getKey(aiAssistantId);
@@ -17,7 +17,7 @@ export const useSWRxThreads = (aiAssistantId: string): SWRResponse<IThreadRelati
 };
 
 
-export const useSWRMUTxThreads = (aiAssistantId?: string): SWRMutationResponse<IThreadRelationHasId[], Error> => {
+export const useSWRMUTxThreads = (aiAssistantId: string): SWRMutationResponse<IThreadRelationHasId[], Error> => {
   const key = getKey(aiAssistantId);
   return useSWRMutation(
     key,