1
0
Fork 0
This repository has been archived on 2025-08-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
backup-websites-2024-01/pages/skoleni/index.tsx

56 lines
1.2 KiB
TypeScript

import Head from "next/head";
import { Header } from "@/components/Header";
import { Footer } from "@/components/Footer";
import { getAllTraining } from "@/lib/cms/training";
import TrainingType from "@/types/training";
import { TrainingListGrid } from "@/components/TrainingListGrid";
export const getStaticProps = async () => {
const allTraining = getAllTraining([
"name",
"slug",
"logo",
"description",
"days",
"weight",
"featured",
"new",
"draft",
]);
return {
props: { allTraining },
};
};
type Props = {
allTraining: TrainingType[];
};
const TrainingList = ({ allTraining }: Props) => {
// remove drafts
const trainingList = allTraining.filter((val) => !val.draft);
return (
<>
<Head>
<title>
Moje školení | Vojtěch Mareš - DevOps konzultant, lektor, engineer
</title>
<meta
name="description"
content="Moje školení | Vojtěch Mareš - DevOps konzultant, lektor, engineer"
/>
</Head>
<main>
<Header />
<TrainingListGrid trainingList={trainingList} />
</main>
<Footer />
</>
);
};
export default TrainingList;