This commit is contained in:
2024-10-08 15:11:16 +08:00
parent a583b8c5ad
commit b9c5a7096a
8 changed files with 21 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ export const metadata = {
description: "**",
}
export default async function Page({ params }: { params: { slug: string } }) {
export default async function Page() {
const courses = await getCourses();
const settings = await getSettings();
const aboutus = await getAboutus();
@@ -32,7 +32,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
return (
<div className='bg-[#F6E8E9]'>
<ResponsiveNav courses={courses} settings={settings} />
<Home courses={courses} settings={settings} aboutus={aboutus} />
<Home settings={settings} aboutus={aboutus} />
</div>
)

View File

@@ -9,10 +9,10 @@ async function getCourses() {
const courses = await fetchCourses();
return courses;
}
async function getCourse(slug: string) {
const course = await fetchCourse(slug);
return course;
}
// async function getCourse(slug: string) {
// const course = await fetchCourse(slug);
// return course;
// }
async function getSettings() {
const settings = await fetchSettings();

View File

@@ -1,7 +1,7 @@
import Home from "../components/Home/Home";
import { fetchCourses, fetchSettings} from "../utils/index";
import ResponsiveNav from "../components/Navbar/ResponsiveNav";
type Props = {}
async function getCourses() {
const courses = await fetchCourses();
@@ -18,7 +18,7 @@ export const metadata = {
description: "**",
}
export default async function HomePage({}: Props) {
export default async function HomePage() {
const courses = await getCourses();
const settings = await getSettings();
return (