1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-02-24 11:33:09 +01:00

61 lines
1.9 KiB
TypeScript
Raw Normal View History

2021-08-16 00:10:18 +02:00
import { Box, Container, SimpleGrid } from '@chakra-ui/react';
2021-08-20 17:06:26 +02:00
import { GlobalHeader } from '../../components/global-header';
2021-08-16 00:10:18 +02:00
import { OpensourceBanner } from '../../components/opensource-banner';
import { UpdatesBanner } from '../../components/updates-banner';
import { Footer } from '../../components/footer';
import { PageHeader } from '../../components/page-header';
import { RoadmapGridItem } from './components/roadmap-grid-item';
2021-09-04 18:50:38 +02:00
import { getAllRoadmaps, RoadmapType } from '../../lib/roadmap';
2021-09-04 22:58:58 +02:00
import Helmet from '../../components/helmet';
2021-09-04 18:50:38 +02:00
type RoadmapsProps = {
roadmaps: RoadmapType[];
};
export default function Roadmaps(props: RoadmapsProps) {
const { roadmaps } = props;
2021-08-16 00:10:18 +02:00
2021-08-14 14:01:42 +02:00
return (
2021-08-16 00:10:18 +02:00
<Box bg='white' minH='100vh'>
2021-08-20 17:06:26 +02:00
<GlobalHeader />
2021-09-04 22:58:58 +02:00
<Helmet
title={'Developer Roadmaps'}
description={'Step by step guides and paths to learn different tools or technologies'}
/>
2021-08-16 00:10:18 +02:00
<Box mb='60px'>
<PageHeader
title={'Developer Roadmaps'}
subtitle={'Step by step guides and paths to learn different tools or technologies'}
/>
<Container maxW='container.md' position='relative'>
2021-08-28 13:50:44 +02:00
<SimpleGrid columns={[1, 1, 2, 2]} mb='30px' spacing={['10px', '10px', '15px']}>
2021-09-04 18:50:38 +02:00
{roadmaps.map((roadmap, counter) => (
<RoadmapGridItem
key={roadmap.id}
href={`/${roadmap.id}`}
colorIndex={counter}
title={roadmap.featuredTitle}
subtitle={roadmap.description}
isCommunity={roadmap.isCommunity}
isUpcoming={roadmap.isUpcoming}
/>
))}
2021-08-16 00:10:18 +02:00
</SimpleGrid>
</Container>
</Box>
<OpensourceBanner />
<UpdatesBanner />
<Footer />
</Box>
2021-08-14 14:01:42 +02:00
);
}
2021-09-04 18:50:38 +02:00
export async function getStaticProps() {
return {
props: {
roadmaps: getAllRoadmaps()
}
};
}