fix: 提交样式和侧边栏ts错误
This commit is contained in:
@@ -143,7 +143,7 @@ const OfferDialog = forwardRef<OfferDialogRef>((props, ref) => {
|
||||
const response = await getSubscription({ skipErrorHandler: true });
|
||||
// 确保返回有效的数组,避免 undefined
|
||||
const list = response.data?.data?.list || [];
|
||||
return list as SubscriptionData[];
|
||||
return list as unknown as SubscriptionData[];
|
||||
} catch (err) {
|
||||
// 自定义错误处理
|
||||
console.error('获取订阅数据失败:', err);
|
||||
@@ -183,7 +183,6 @@ const OfferDialog = forwardRef<OfferDialogRef>((props, ref) => {
|
||||
price: 8,
|
||||
originalPrice: 10,
|
||||
duration: 'year',
|
||||
isPopular: false,
|
||||
features: {
|
||||
traffic: '140G',
|
||||
duration: '30天',
|
||||
@@ -216,7 +215,6 @@ const OfferDialog = forwardRef<OfferDialogRef>((props, ref) => {
|
||||
price: 48,
|
||||
originalPrice: 60,
|
||||
duration: 'year',
|
||||
isPopular: false,
|
||||
features: {
|
||||
traffic: '180G',
|
||||
duration: '30天',
|
||||
|
||||
@@ -13,7 +13,7 @@ import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { usePathname, useRouter } from 'next/navigation';
|
||||
|
||||
export function UserNav({ from }: { from: string }) {
|
||||
export function UserNav({ from = '' }: { from?: string }) {
|
||||
const t = useTranslations('menu');
|
||||
const { user, setUser } = useGlobalStore();
|
||||
const router = useRouter();
|
||||
@@ -55,7 +55,7 @@ export function UserNav({ from }: { from: string }) {
|
||||
<DropdownMenuContent
|
||||
forceMount
|
||||
align='end'
|
||||
side={from === 'profile' ? 'right' : ''}
|
||||
side={from === 'profile' ? 'right' : undefined}
|
||||
className='w-64 gap-3 rounded-[42px] p-3'
|
||||
>
|
||||
<div className='mb-3 flex items-center justify-start gap-2 rounded-full bg-[#EAEAEA] p-1'>
|
||||
|
||||
Reference in New Issue
Block a user