mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-10 02:11:19 -05:00
- Added language, languageDescription, and languagePlaceholder fields to product.json for multiple locales (ja-JP, ko-KR, no-NO, pl-PL, pt-BR, ro-RO, ru-RU, th-TH, tr-TR, uk-UA, vi-VN, zh-HK). - Removed group-related fields from product.json for cleaner structure. - Updated API calls in user services to include language parameter for subscription retrieval. - Enhanced type definitions for subscription requests to accommodate language parameter.
31 lines
700 B
TypeScript
31 lines
700 B
TypeScript
import { getSubscription } from '@/services/user/portal';
|
|
import { getLocale } from 'next-intl/server';
|
|
import Content from './content';
|
|
|
|
export default async function Page({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<{
|
|
id: string;
|
|
}>;
|
|
}) {
|
|
const { id } = await searchParams;
|
|
const locale = await getLocale();
|
|
const { data } = await getSubscription(
|
|
{
|
|
language: locale,
|
|
},
|
|
{
|
|
skipErrorHandler: true,
|
|
},
|
|
);
|
|
const subscriptionList = data.data?.list || [];
|
|
const subscription = subscriptionList.find((item) => item.id === Number(id));
|
|
|
|
return (
|
|
<main className='container space-y-16'>
|
|
<Content subscription={subscription} />
|
|
</main>
|
|
);
|
|
}
|