32 lines
731 B
TypeScript
32 lines
731 B
TypeScript
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();
|
|
return courses;
|
|
}
|
|
|
|
async function getSettings(){
|
|
const settings = await fetchSettings();
|
|
return settings;
|
|
}
|
|
|
|
export const metadata = {
|
|
title: "All In One",
|
|
description: "**",
|
|
}
|
|
|
|
export default async function HomePage({}: Props) {
|
|
const courses = await getCourses();
|
|
const settings = await getSettings();
|
|
return (
|
|
<div>
|
|
<ResponsiveNav courses={courses} settings={settings} />
|
|
<Home courses={courses} settings={settings} />
|
|
</div>
|
|
);
|
|
}
|
|
|