From 3cb0629d64aacc91014657a41a45f8f0994070bc Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Tue, 28 Jan 2025 13:55:43 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(type):=20Fix=20ts=20type=20c?= =?UTF-8?q?heck=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin/app/dashboard/user/page.tsx | 24 +++++++++++------------ apps/user/app/oauth/[platform]/page.tsx | 10 ++-------- packages/ui/src/components/hyper-text.tsx | 6 +++--- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/apps/admin/app/dashboard/user/page.tsx b/apps/admin/app/dashboard/user/page.tsx index c16043c..804a163 100644 --- a/apps/admin/app/dashboard/user/page.tsx +++ b/apps/admin/app/dashboard/user/page.tsx @@ -71,18 +71,18 @@ export default function Page() { accessorKey: 'id', header: 'ID', }, - { - accessorKey: 'email', - header: t('userName'), - }, - { - accessorKey: 'telephone', - header: t('telephone'), - cell: ({ row }) => { - if (!row.original.telephone) return '--'; - return `+${row.original.telephone_area_code} ${row.original.telephone}`; - }, - }, + // { + // accessorKey: 'email', + // header: t('userName'), + // }, + // { + // accessorKey: 'telephone', + // header: t('telephone'), + // cell: ({ row }) => { + // if (!row.original.telephone) return '--'; + // return `+${row.original.telephone_area_code} ${row.original.telephone}`; + // }, + // }, { accessorKey: 'balance', header: t('balance'), diff --git a/apps/user/app/oauth/[platform]/page.tsx b/apps/user/app/oauth/[platform]/page.tsx index 947311c..130c413 100644 --- a/apps/user/app/oauth/[platform]/page.tsx +++ b/apps/user/app/oauth/[platform]/page.tsx @@ -24,14 +24,8 @@ export async function generateStaticParams() { ]; } -export default async function Page({ - params, -}: { - params: { - platform: string; - }; -}) { - const { platform } = await params; +export default async function Page({ params }: any) { + const { platform } = params; const t = await getTranslations('auth'); return ( diff --git a/packages/ui/src/components/hyper-text.tsx b/packages/ui/src/components/hyper-text.tsx index 4cb162a..2dda156 100644 --- a/packages/ui/src/components/hyper-text.tsx +++ b/packages/ui/src/components/hyper-text.tsx @@ -69,7 +69,7 @@ export default function HyperText({ const observer = new IntersectionObserver( ([entry]) => { - if (entry.isIntersecting) { + if (entry?.isIntersecting) { setTimeout(() => { setIsAnimating(true); }, delay); @@ -100,8 +100,8 @@ export default function HyperText({ letter === ' ' ? letter : index <= iterationCount.current - ? children[index] - : characterSet[getRandomInt(characterSet.length)], + ? (children[index] ?? ' ') + : (characterSet[getRandomInt(characterSet.length)] ?? ' '), ), ); iterationCount.current = iterationCount.current + 0.1;