mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-18 20:09:25 +00:00
refactor: update CertificateVerifyPage to handle async params for certificate UUID
This commit is contained in:
parent
4af594e628
commit
f84529e467
3 changed files with 5 additions and 28 deletions
|
|
@ -1,11 +0,0 @@
|
|||
import CertificateVerificationPage from '@components/Pages/Certificate/CertificateVerificationPage'
|
||||
|
||||
interface CertificateVerifyPageProps {
|
||||
params: {
|
||||
certificateUuid: string
|
||||
}
|
||||
}
|
||||
|
||||
export default function CertificateVerifyPage({ params }: CertificateVerifyPageProps) {
|
||||
return <CertificateVerificationPage certificateUuid={params.certificateUuid} />
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
export default function CertificatesLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<div className="max-w-4xl mx-auto px-4 py-8">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -2,13 +2,14 @@ import CertificateVerificationPage from '@components/Pages/Certificate/Certifica
|
|||
import React from 'react';
|
||||
|
||||
interface CertificateVerifyPageProps {
|
||||
params: {
|
||||
params: Promise<{
|
||||
uuid: string;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
const CertificateVerifyPage: React.FC<CertificateVerifyPageProps> = ({ params }) => {
|
||||
return <CertificateVerificationPage certificateUuid={params.uuid} />;
|
||||
const CertificateVerifyPage: React.FC<CertificateVerifyPageProps> = async ({ params }) => {
|
||||
const { uuid } = await params;
|
||||
return <CertificateVerificationPage certificateUuid={uuid} />;
|
||||
};
|
||||
|
||||
export default CertificateVerifyPage;
|
||||
Loading…
Add table
Add a link
Reference in a new issue