diff --git a/components/back-button.tsx b/components/back-button.tsx
index b87267e..83f3f40 100644
--- a/components/back-button.tsx
+++ b/components/back-button.tsx
@@ -8,7 +8,7 @@ export default function BackButton() {
return (
router.push('/works')}
+ onClick={() => router.push('/work')}
>
All Projects
diff --git a/components/content-list.tsx b/components/content-list.tsx
index 6660d9e..a3bf6a8 100644
--- a/components/content-list.tsx
+++ b/components/content-list.tsx
@@ -13,8 +13,8 @@ export function ContentList({
contentType,
basePath,
}: ContentListProps) {
- if (contentType === 'works') {
- const otherWorks = items.filter((x) => !x.selectedWork);
+ if (contentType === 'work') {
+ const otherWork = items.filter((x) => !x.selectedWork);
return (
@@ -25,13 +25,13 @@ export function ContentList({
))}
- {otherWorks.length > 0 && (
+ {otherWork.length > 0 && (
<>
Other Experiments
>
)}
@@ -42,10 +42,10 @@ export function ContentList({
return ;
}
-function WorkListGrid({ works }: { works: IContent[] }) {
+function WorkListGrid({ work }: { work: IContent[] }) {
return (
- {works.map((item) => (
+ {work.map((item) => (
))}
diff --git a/components/index.tsx b/components/index.tsx
index c18d1d8..1d85fff 100644
--- a/components/index.tsx
+++ b/components/index.tsx
@@ -10,7 +10,7 @@ export * from './logo';
export * from './notes';
export * from './nav';
export * from './footer';
-export * from './works';
+export * from './work';
export * from './socials';
export * from './link';
export * from './testimonials';
diff --git a/components/nav/mobile-nav.tsx b/components/nav/mobile-nav.tsx
index 362db84..1529bf6 100644
--- a/components/nav/mobile-nav.tsx
+++ b/components/nav/mobile-nav.tsx
@@ -45,11 +45,11 @@ export function MobileNav() {
toggleMenuOpen()}
>
- Works
+ Work
diff --git a/components/nav/nav.tsx b/components/nav/nav.tsx
index 00c9aeb..5279524 100644
--- a/components/nav/nav.tsx
+++ b/components/nav/nav.tsx
@@ -42,7 +42,7 @@ export function Nav() {
)}
-
+
diff --git a/components/works/index.ts b/components/work/index.ts
similarity index 100%
rename from components/works/index.ts
rename to components/work/index.ts
diff --git a/components/works/work.tsx b/components/work/work.tsx
similarity index 97%
rename from components/works/work.tsx
rename to components/work/work.tsx
index e391a0b..deb552c 100644
--- a/components/works/work.tsx
+++ b/components/work/work.tsx
@@ -18,7 +18,7 @@ export function WorkItem({ work, grid }: { work: IContent; grid?: boolean }) {
const { title, slug, description } = work;
return (
diff --git a/content/notes/markdown-1.md b/content/notes/markdown-1.md
index be06227..e903427 100644
--- a/content/notes/markdown-1.md
+++ b/content/notes/markdown-1.md
@@ -1,5 +1,5 @@
---
-title: "Getting started with React Nativ"
+title: "Getting started with React Native"
date: "2021-01-01"
slug: "getting-started-with-react-native"
description: "Next.js has two forms of pre-rendering: Static Generation and Server-side Rendering. The difference is in when it generates the HTML for a page."
diff --git a/content/work/code-colab.md b/content/work/code-collab.md
similarity index 100%
rename from content/work/code-colab.md
rename to content/work/code-collab.md
diff --git a/playwright/navigation.spec.ts b/playwright/navigation.spec.ts
index d87a505..eb38c2b 100644
--- a/playwright/navigation.spec.ts
+++ b/playwright/navigation.spec.ts
@@ -2,19 +2,19 @@ import { expect, test } from '@playwright/test';
test('Navigate and check content', async ({ page }) => {
await page.goto('/');
- await expect(page.getByRole('link', { name: 'Works' })).toBeVisible();
+ await expect(page.getByRole('link', { name: 'Work' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Articles' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Notes' })).toBeVisible();
await expect(page.getByRole('link', { name: 'About' })).toBeVisible();
await expect(
- page.locator('div:has-text("WorksArticlesNotesAbout") a').nth(4),
+ page.locator('div:has-text("WorkArticlesNotesAbout") a').nth(4),
).toBeVisible();
await expect(page.locator('h1')).toContainText('Senior Software Engineer');
- await page.getByRole('link', { name: 'Works' }).click();
- await page.waitForURL('/works');
- await expect(page).toHaveTitle('Selected Works | NextJS Starter Peacock');
- await expect(page.locator('h1')).toContainText('Selected Works');
+ await page.getByRole('link', { name: 'Work' }).click();
+ await page.waitForURL('/work');
+ await expect(page).toHaveTitle('Selected Work | NextJS Starter Peacock');
+ await expect(page.locator('h1')).toContainText('Selected Work');
await page.getByRole('link', { name: 'Articles' }).click();
await page.waitForURL('/articles');
@@ -32,7 +32,7 @@ test('Navigate and check content', async ({ page }) => {
await expect(page.getByRole('heading')).toContainText('About Me 🧘🏾♂️');
await expect(
await page
- .locator('div:has-text("WorksArticlesNotesAbout") a')
+ .locator('div:has-text("WorkArticlesNotesAbout") a')
.nth(4)
.getAttribute('href'),
).toContain('/rss.xml');
diff --git a/utils/content-types.ts b/utils/content-types.ts
index 9a4c78c..3b34c60 100644
--- a/utils/content-types.ts
+++ b/utils/content-types.ts
@@ -27,12 +27,12 @@ export const contentTypesMap: Map<
},
],
[
- 'works',
+ 'work',
{
- title: 'Selected Works',
+ title: 'Selected Work',
description:
- "Selected works I'm proud of, ranging from Software Engineering and Product Design.",
- path: 'works',
+ "Selected work I'm proud of, ranging from Software Engineering and Product Design.",
+ path: 'work',
},
],
]);
diff --git a/utils/content.ts b/utils/content.ts
index fd2e918..c8fac90 100644
--- a/utils/content.ts
+++ b/utils/content.ts
@@ -40,7 +40,7 @@ export type IContent = {
category?: string;
};
-export type IContentType = 'articles' | 'notes' | 'works';
+export type IContentType = 'articles' | 'notes' | 'work';
export type IContentDataWithDraftType = IContentData & Pick;
@@ -82,7 +82,7 @@ export const getAllContentIds = (contentType: IContentType) => {
filenames = fs.readdirSync(notesDirectory);
break;
- case 'works':
+ case 'work':
baseDir = workDirectory;
filenames = fs.readdirSync(workDirectory);
break;
@@ -131,7 +131,7 @@ export const getContentData = async (
contentTypeDirectory = notesDirectory;
break;
- case 'works':
+ case 'work':
filenames = fs.readdirSync(workDirectory);
contentTypeDirectory = workDirectory;
break;
@@ -200,7 +200,7 @@ export const getContentList = (contentType: IContentType): IContent[] => {
contentDir = notesDirectory;
break;
- case 'works':
+ case 'work':
contentFiles = fs.readdirSync(workDirectory);
contentDir = workDirectory;
break;
@@ -245,7 +245,7 @@ export const getContentWithTag = (tag: string, contentType: IContentType) => {
contentDir = notesDirectory;
break;
- case 'works':
+ case 'work':
contentDir = workDirectory;
break;
@@ -298,7 +298,7 @@ export const getContentInCategory = (
contentDir = notesDirectory;
break;
- case 'works':
+ case 'work':
contentDir = workDirectory;
break;