Skip to content

Commit 451d296

Browse files
committed
fix: 불필요 파일 삭제
1 parent adbacea commit 451d296

File tree

5 files changed

+9
-2988
lines changed

5 files changed

+9
-2988
lines changed

pages/_app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import Layout from '@/components/layout';
44

55
import 'prismjs/themes/prism-tomorrow.css';
66
import 'katex/dist/katex.min.css';
7+
78
import '@/assets/styles/index.css';
8-
import '@/assets/styles/notion-x.css';
9+
import 'notion-to-jsx/dist/index.css';
910

1011
const App = ({ Component, pageProps }: AppProps) => {
1112
return (

pages/about.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
import { GetStaticProps } from 'next';
2-
import { NotionRenderer } from 'react-notion-x';
2+
import { NotionBlock, Renderer } from 'notion-to-jsx';
33

4-
import { ExtendedRecordMap as EmbeddedRecordMap } from '@/interfaces/notion';
5-
import { getPage } from '@/utils';
4+
import { notionClient } from '@/utils';
65

76
import PageHead from '@/components/common/PageHead';
87

98
import { REVALIDATE_TIME } from '@/assets/constants';
109

1110
interface Props {
12-
recordMap: EmbeddedRecordMap;
11+
blocks: NotionBlock[];
1312
}
1413

15-
const AboutPage = ({ recordMap }: Props) => {
14+
const AboutPage = ({ blocks }: Props) => {
1615
return (
1716
<>
1817
<PageHead title="About" />
19-
<article>
20-
<NotionRenderer
21-
recordMap={recordMap as Parameters<typeof NotionRenderer>[0]['recordMap']}
22-
/>
23-
</article>
18+
<Renderer blocks={blocks} />
2419
</>
2520
);
2621
};
@@ -32,11 +27,10 @@ export const getStaticProps: GetStaticProps<Props> = async () => {
3227

3328
if (!aboutId) throw new Error('NOTION_ABOUT_ID is not defined');
3429

35-
const recordMap = await getPage(aboutId);
36-
30+
const blocks = (await notionClient.getPageBlocks(aboutId)) as NotionBlock[];
3731
return {
3832
props: {
39-
recordMap,
33+
blocks,
4034
},
4135
revalidate: REVALIDATE_TIME,
4236
};

pages/posts/[slug].tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import PageHead from '@/components/common/PageHead';
1010

1111
import { REVALIDATE_TIME } from '@/assets/constants';
1212

13-
import 'notion-to-jsx/dist/index.css';
1413
interface Props {
1514
blocks: NotionBlock[];
1615
seo: {

src/assets/styles/index.css

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,3 @@ body {
1010

1111
min-width: 360px;
1212
}
13-
14-
.notion-page {
15-
padding-bottom: calc(max(5vh, 32px)) !important;
16-
line-height: 1.65;
17-
}
18-
19-
.notion-text {
20-
padding: 0.5em 2px;
21-
}
22-
23-
.notion-page-cover-wrapper,
24-
.notion-page-cover-wrapper span,
25-
.notion-page-cover-wrapper img {
26-
max-width: 1200px !important;
27-
border-radius: 24px;
28-
}
29-
30-
.notion-collection-page-properties {
31-
display: none !important;
32-
}
33-
34-
@media only screen and (max-width: 1200px) {
35-
.notion-page-cover-wrapper,
36-
.notion-page-cover-wrapper span,
37-
.notion-page-cover-wrapper img {
38-
border-radius: 0;
39-
}
40-
}
41-
42-
@media (min-width: 1300px) and (min-height: 300px) {
43-
.notion-page-content-has-aside {
44-
width: calc((97vw + var(--notion-max-width)) / 2);
45-
}
46-
}
47-
48-
.notion-page-cover-wrapper {
49-
box-shadow: 2px 2px 8px 4px rgba(15, 15, 15, 0.1);
50-
}
51-
52-
.notion-aside-table-of-contents-header {
53-
display: none;
54-
}

0 commit comments

Comments
 (0)