Skip to content

Commit

Permalink
feat: remove about page, fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ooooorobo committed Nov 16, 2023
1 parent 2258d8a commit 0e8a979
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 201 deletions.
3 changes: 0 additions & 3 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ export default function Header() {
</Link>
</div>
<div>
<Link href={"/about"}>
<a>About</a>
</Link>
<button onClick={toggleDarkMode}>
{isDarkMode ? (
<i className="bi bi-moon-fill" />
Expand Down
21 changes: 10 additions & 11 deletions src/components/main/Profile.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import Image from "next/image";
import styled from "styled-components";
import ContactIconList from "@src/components/common/ContactIconList";
import Link from "next/link";

export default function Profile() {
return (
<Wrapper>
<Link href={"/about"} passHref>
<ProfileImageWrapper>
<Image
src={"/profile.png"}
width={"100px"}
height={"100px"}
alt={"프로필 사진"}
/>
</ProfileImageWrapper>
</Link>
<ProfileImageWrapper>
<Image
src={"/profile.png"}
width={"100px"}
height={"100px"}
alt={"프로필 사진"}
/>
</ProfileImageWrapper>
<div>
<h3>조예진</h3>
<ContactIconList />
Expand All @@ -33,6 +30,7 @@ const Wrapper = styled.div`
height: 100%;
margin: 5px 0;
}
p {
margin: 0;
}
Expand All @@ -41,6 +39,7 @@ const Wrapper = styled.div`
const ProfileImageWrapper = styled.a`
margin: auto 0;
cursor: pointer;
img {
border-radius: 30px 10px 30px 10px;
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/mdx/Aside.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropsWithChildren } from "react";

export default ({ children, ...rest }: PropsWithChildren) => (
<aside {...rest}>{children}</aside>
);
export default function Aside({ children, ...rest }: PropsWithChildren) {
return <aside {...rest}>{children}</aside>;
}
12 changes: 7 additions & 5 deletions src/components/mdx/Caption.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { PropsWithChildren } from "react";

export default ({ children, ...rest }: PropsWithChildren) => (
<p className={"caption"} {...rest}>
{children}
</p>
);
export default function Caption({ children, ...rest }: PropsWithChildren) {
return (
<p className={"caption"} {...rest}>
{children}
</p>
);
}
12 changes: 7 additions & 5 deletions src/components/mdx/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { PropsWithChildren } from "react";

export default ({ children, ...rest }: PropsWithChildren) => (
<a className={"link"} {...rest}>
{children}
</a>
);
export default function Link({ children, ...rest }: PropsWithChildren) {
return (
<a className={"link"} {...rest}>
{children}
</a>
);
}
172 changes: 0 additions & 172 deletions src/pages/about.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions src/pages/posts/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export async function getStaticProps(context: GetStaticPropsContext) {
(post) => post._raw.flattenedPath === context.params?.slug
);
const post = allPosts[postIdx];
const prevPost = allPosts[postIdx - 1],
nextPost = allPosts[postIdx + 1];
const prevPost = allPosts[postIdx - 1] ?? null,
nextPost = allPosts[postIdx + 1] ?? null;

// Return notFound if the post does not exist.
if (!post) return { notFound: true };
Expand Down

0 comments on commit 0e8a979

Please sign in to comment.