You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/page.tsx

34 lines
1018 B
TypeScript

import React from 'react'
import ChartView from './chartView'
import CardView from './cardView'
import { getLocaleOnServer } from '@/i18n/server'
import { useTranslation as translate } from '@/i18n/i18next-serverside-config'
import ApikeyInfoPanel from '@/app/components/app/overview/apikey-info-panel'
export type IDevelopProps = {
params: { appId: string }
}
const Overview = async ({
params: { appId },
}: IDevelopProps) => {
const locale = getLocaleOnServer()
/*
rename useTranslation to avoid lint error
please check: https://github.com/i18next/next-13-app-dir-i18next-example/issues/24
*/
const { t } = await translate(locale, 'app-overview')
return (
<div className="h-full px-4 sm:px-16 py-6 overflow-scroll">
<ApikeyInfoPanel />
<div className='flex flex-row items-center justify-between mb-4 text-xl text-gray-900'>
{t('overview.title')}
</div>
<CardView appId={appId} />
<ChartView appId={appId} />
</div>
)
}
export default Overview