diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/develop/page.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/develop/page.tsx index d544059a84..4101120703 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/develop/page.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/develop/page.tsx @@ -1,5 +1,4 @@ import React from 'react' -import { getDictionary } from '@/i18n/server' import { type Locale } from '@/i18n' import DevelopMain from '@/app/components/develop' @@ -8,11 +7,9 @@ export type IDevelopProps = { } const Develop = async ({ - params: { locale, appId }, + params: { appId }, }: IDevelopProps) => { - const dictionary = await getDictionary(locale) - - return + return } export default Develop diff --git a/web/app/components/develop/index.tsx b/web/app/components/develop/index.tsx index a8a16d0ff3..5034a1db7d 100644 --- a/web/app/components/develop/index.tsx +++ b/web/app/components/develop/index.tsx @@ -9,20 +9,17 @@ import { fetchAppDetail } from '@/service/apps' type IDevelopMainProps = { appId: string - dictionary: any } -const DevelopMain = ({ appId, dictionary }: IDevelopMainProps) => { +const DevelopMain = ({ appId }: IDevelopMainProps) => { const commonParams = { url: '/apps', id: appId } const { data: appDetail } = useSWR(commonParams, fetchAppDetail) const { t } = useTranslation() - // const serverApi = `${appDetail?.site?.app_base_url}/api/${appDetail?.site?.access_token}` - return (
-
{dictionary.app?.develop?.title}
+
diff --git a/web/app/components/i18n-server.tsx b/web/app/components/i18n-server.tsx index 39a5f7ca1d..25e999ed48 100644 --- a/web/app/components/i18n-server.tsx +++ b/web/app/components/i18n-server.tsx @@ -1,7 +1,7 @@ import React from 'react' import I18N from './i18n' import { ToastProvider } from './base/toast' -import { getDictionary, getLocaleOnServer } from '@/i18n/server' +import { getLocaleOnServer } from '@/i18n/server' export type II18NServerProps = { children: React.ReactNode @@ -11,10 +11,9 @@ const I18NServer = async ({ children, }: II18NServerProps) => { const locale = getLocaleOnServer() - const dictionary = await getDictionary(locale) return ( - + {children} ) diff --git a/web/app/components/i18n.tsx b/web/app/components/i18n.tsx index 32e1c93073..4166449e76 100644 --- a/web/app/components/i18n.tsx +++ b/web/app/components/i18n.tsx @@ -9,12 +9,10 @@ import { setLocaleOnClient } from '@/i18n/client' export type II18nProps = { locale: Locale - dictionary: Record children: React.ReactNode } const I18n: FC = ({ locale, - dictionary, children, }) => { useEffect(() => { @@ -24,7 +22,7 @@ const I18n: FC = ({ return ( {children} diff --git a/web/app/components/share/text-generation/history/index.tsx b/web/app/components/share/text-generation/history/index.tsx deleted file mode 100644 index a100c98a17..0000000000 --- a/web/app/components/share/text-generation/history/index.tsx +++ /dev/null @@ -1,79 +0,0 @@ -'use client' -import React, { useState } from 'react' -import useSWR from 'swr' -import { - ChevronDownIcon, - ChevronUpIcon, -} from '@heroicons/react/24/outline' -import { fetchHistories } from '@/models/history' -import type { History as HistoryItem } from '@/models/history' -import Loading from '@/app/components/base/loading' -import { mockAPI } from '@/test/test_util' - -mockAPI() - -export type IHistoryProps = { - dictionary: any -} - -const HistoryCard = ( - { history }: { history: HistoryItem }, -) => { - return ( -
-
- {history.source} -
- - ) -} - -const History = ({ - dictionary, -}: IHistoryProps) => { - const { data, error } = useSWR('http://localhost:3000/api/histories', fetchHistories) - const [showHistory, setShowHistory] = useState(false) - - const DivideLine = () => { - return
- {/* divider line */} -