Skip to content

Commit

Permalink
Refactor certificate page: replace old component with new structure a…
Browse files Browse the repository at this point in the history
…nd update routing
  • Loading branch information
upayanmazumder committed Nov 22, 2024
1 parent f9ce153 commit 95a8d47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
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;
4 changes: 0 additions & 4 deletions app/src/shared/certificatesData.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import Image from 'next/image';

// Function to create slugs from titles
export const createSlug = (title) => title.toLowerCase().replace(/\s+/g, '-');

// Array of certificate objects
export const certificates = [
{
title: "Cookoff 9",
Expand Down

0 comments on commit 95a8d47

Please sign in to comment.