Skip to content

Commit 1efa7ff

Browse files
authored
Merge pull request #56 from apsislabs/feature/remove-projects
Remove projects section on homepage
2 parents cc0aeb6 + 54d73b7 commit 1efa7ff

File tree

2 files changed

+2
-51
lines changed

2 files changed

+2
-51
lines changed

data/projects.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/pages/index.tsx

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ import { Section } from "components/Section";
1111
import { SiteLayout } from "components/SiteLayout";
1212
import { ValueSection } from "components/ValueSection";
1313
import { siteConf } from "conf";
14-
import { readFileSync } from "fs";
15-
import yaml from "js-yaml";
16-
import { dataDirectory, getRandomCta } from "lib/posts";
14+
import { getRandomCta } from "lib/posts";
1715
import {
1816
ChevronRight,
1917
FileJson,
@@ -23,22 +21,17 @@ import {
2321
SquareTerminalIcon,
2422
} from "lucide-react";
2523
import { NextPage } from "next";
26-
import path from "path";
2724
import { RepoCard } from "../components/RepoCard";
2825

2926
export async function getStaticProps() {
30-
const projectsData = readFileSync(path.join(dataDirectory, "projects.yml"));
31-
3227
return {
3328
props: {
34-
projects: yaml.load(projectsData),
3529
cta: getRandomCta(),
3630
},
3731
};
3832
}
3933

40-
export const IndexPage: NextPage<{ projects: any[]; cta: CtaProps }> = ({
41-
projects,
34+
export const IndexPage: NextPage<{ cta: CtaProps }> = ({
4235
cta,
4336
}) => {
4437
return (
@@ -128,21 +121,6 @@ export const IndexPage: NextPage<{ projects: any[]; cta: CtaProps }> = ({
128121
</footer>
129122
</section>
130123
</Section>
131-
132-
<Section label="Projects" Icon={PresentationIcon} spaced>
133-
<Carousel
134-
slides={projects.map((p, i) => (
135-
<ProjectSlide
136-
key={i}
137-
title={p.title}
138-
content={<MarkdownContent content={p.content} />}
139-
image={p.image}
140-
button={p.button}
141-
link={p.link}
142-
/>
143-
))}
144-
/>
145-
</Section>
146124
</SiteLayout>
147125
</>
148126
);

0 commit comments

Comments
 (0)