2023-12-23 14:54:38 -06:00
|
|
|
import Head from 'next/head'
|
2024-02-11 16:26:33 -06:00
|
|
|
import React, {useCallback, useEffect, useState} from 'react';
|
2023-12-23 20:33:25 -06:00
|
|
|
import CoursesCarousel from '@/components/courses/CoursesCarousel'
|
|
|
|
import ResourcesCarousel from '@/components/resources/ResourcesCarousel'
|
2024-02-11 16:26:33 -06:00
|
|
|
import { useNostr } from '@/hooks/useNostr'
|
2023-12-23 14:54:38 -06:00
|
|
|
|
|
|
|
export default function Home() {
|
2024-02-27 18:29:57 -06:00
|
|
|
const { fetchResources, fetchCourses } = useNostr();
|
2024-02-11 16:26:33 -06:00
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
fetchResources();
|
2024-02-27 18:29:57 -06:00
|
|
|
fetchCourses();
|
|
|
|
}, [fetchResources, fetchCourses]);
|
2024-02-11 16:26:33 -06:00
|
|
|
|
2023-12-23 14:54:38 -06:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Head>
|
|
|
|
<title>Create Next App</title>
|
|
|
|
<meta name="description" content="Generated by create next app" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<link rel="icon" href="/favicon.ico" />
|
|
|
|
</Head>
|
2023-12-23 20:33:25 -06:00
|
|
|
<main>
|
|
|
|
<CoursesCarousel />
|
|
|
|
<ResourcesCarousel />
|
2023-12-23 14:54:38 -06:00
|
|
|
</main>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|