mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19: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';
|
import React from 'react';
|
||||||
|
|
||||||
interface CertificateVerifyPageProps {
|
interface CertificateVerifyPageProps {
|
||||||
params: {
|
params: Promise<{
|
||||||
uuid: string;
|
uuid: string;
|
||||||
};
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CertificateVerifyPage: React.FC<CertificateVerifyPageProps> = ({ params }) => {
|
const CertificateVerifyPage: React.FC<CertificateVerifyPageProps> = async ({ params }) => {
|
||||||
return <CertificateVerificationPage certificateUuid={params.uuid} />;
|
const { uuid } = await params;
|
||||||
|
return <CertificateVerificationPage certificateUuid={uuid} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CertificateVerifyPage;
|
export default CertificateVerifyPage;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue