This commit is contained in:
2024-10-08 19:08:37 +08:00
parent b844c2a509
commit 98c1a28dfb
29 changed files with 156 additions and 39 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react'
import ResponsiveNav from "@/components/Navbar/ResponsiveNav";
import { fetchCourses, fetchCourse, fetchSettings } from "@/utils";
import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('@/components/Course/Course'), {
ssr: false,
})
@@ -19,10 +20,6 @@ async function getSettings() {
return settings;
}
export const metadata = {
title: "All In One",
description: "**",
}
export default async function Page({ params }: { params: { slug: string } }) {
const courses = await getCourses();
@@ -34,6 +31,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
}
return (
<div className='bg-[#F6E8E8]'>
<ResponsiveNav courses={courses} settings={settings} />
<DynamicComponent course={course} settings={settings} />
</div>