-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor certificate page: replace old component with new structure a…
…nd update routing
- Loading branch information
1 parent
f9ce153
commit 95a8d47
Showing
2 changed files
with
6 additions
and
10 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
app/src/app/certificates/[certificate].js → ...rc/app/certificates/[certificate]/page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
"use client" | ||
|
||
import React from "react"; | ||
import Certificate from "@/components/certificate/certificate"; | ||
import { useRouter } from 'next/router'; | ||
import { useParams } from "next/navigation"; | ||
|
||
const CertificatePage = () => { | ||
const { query: { certificate: slug } } = useRouter(); | ||
const { certificate: slug } = useParams(); | ||
|
||
return ( | ||
<> | ||
<Certificate slug={slug} /> | ||
</> | ||
<Certificate slug={slug} /> | ||
); | ||
} | ||
}; | ||
|
||
export default CertificatePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters