frondend/app/aboutus/page.tsx

45 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2024-10-06 11:52:45 +08:00
import React from 'react'
import ResponsiveNav from "@/components/Navbar/ResponsiveNav";
import { fetchCourses, fetchSettings, fetchAboutus } from "@/utils";
2024-10-08 14:46:18 +08:00
import {AboutusProps } from "@/types";
2024-10-06 11:52:45 +08:00
import Home from '@/components/Aboutus/Home';
2024-10-08 19:08:37 +08:00
2024-10-06 11:52:45 +08:00
async function getCourses() {
const courses = await fetchCourses();
return courses;
}
async function getAboutus() {
const aboutus: AboutusProps[] = await fetchAboutus();
return aboutus;
}
async function getSettings() {
const settings = await fetchSettings();
return settings;
}
export const metadata = {
2024-10-30 15:21:20 +08:00
title: "One And All Music",
2024-10-28 21:13:57 +08:00
description: "發掘你的音樂之路 - 專業音樂課程、樂器教學、音樂活動",
icons: {
icon: '/favicon.ico',
},
}
2024-10-06 11:52:45 +08:00
2024-10-08 15:11:16 +08:00
export default async function Page() {
2024-10-06 11:52:45 +08:00
const courses = await getCourses();
const settings = await getSettings();
const aboutus = await getAboutus();
//const course = await getCourse(params.slug);
return (
<div className='bg-[#F6E8E9]'>
2024-10-08 19:08:37 +08:00
2024-10-06 11:52:45 +08:00
<ResponsiveNav courses={courses} settings={settings} />
2024-10-08 15:11:16 +08:00
<Home settings={settings} aboutus={aboutus} />
2024-10-06 11:52:45 +08:00
</div>
)
}