| import style from '../list.module.css' | import style from '../list.module.css' | ||||
| import Apps from './Apps' | import Apps from './Apps' | ||||
| import { getLocaleOnServer } from '@/i18n/server' | import { getLocaleOnServer } from '@/i18n/server' | ||||
| import { useTranslation } from '@/i18n/i18next-serverside-config' | |||||
| import { useTranslation as translate } from '@/i18n/i18next-serverside-config' | |||||
| const AppList = async () => { | const AppList = async () => { | ||||
| const locale = getLocaleOnServer() | const locale = getLocaleOnServer() | ||||
| const { t } = await useTranslation(locale, 'app') | |||||
| const { t } = await translate(locale, 'app') | |||||
| return ( | return ( | ||||
| <div className='flex flex-col overflow-auto bg-gray-100 shrink-0 grow'> | <div className='flex flex-col overflow-auto bg-gray-100 shrink-0 grow'> |
| import React from 'react' | import React from 'react' | ||||
| import { getLocaleOnServer } from '@/i18n/server' | import { getLocaleOnServer } from '@/i18n/server' | ||||
| import { useTranslation } from '@/i18n/i18next-serverside-config' | |||||
| import { useTranslation as translate } from '@/i18n/i18next-serverside-config' | |||||
| import Form from '@/app/components/datasets/settings/form' | import Form from '@/app/components/datasets/settings/form' | ||||
| type Props = { | type Props = { | ||||
| params: { datasetId }, | params: { datasetId }, | ||||
| }: Props) => { | }: Props) => { | ||||
| const locale = getLocaleOnServer() | const locale = getLocaleOnServer() | ||||
| // eslint-disable-next-line react-hooks/rules-of-hooks | |||||
| const { t } = await useTranslation(locale, 'dataset-settings') | |||||
| const { t } = await translate(locale, 'dataset-settings') | |||||
| return ( | return ( | ||||
| <div className='bg-white h-full overflow-y-auto'> | <div className='bg-white h-full overflow-y-auto'> |