1
1
import { defer , LoaderFunction , LoaderFunctionArgs } from "@remix-run/node" ;
2
- import { Await , MetaFunction , useLoaderData } from "@remix-run/react" ;
2
+ import { Await , useLoaderData } from "@remix-run/react" ;
3
3
import { NotionAPI } from "notion-client" ;
4
4
import React , { lazy , Suspense } from "react" ;
5
5
import { ClientOnly } from "remix-utils/client-only" ;
@@ -14,7 +14,7 @@ import { NotionRenderer } from "vendor/react-notion-x/packages/react-notion-x";
14
14
15
15
import { Footer } from "~/components/organisms/Footer" ;
16
16
import { Header } from "~/components/organisms/Header" ;
17
- import { Post , posts } from "~/data/posts" ;
17
+ import { posts } from "~/data/posts" ;
18
18
19
19
const Equation = lazy ( ( ) =>
20
20
import ( "react-notion-x/build/third-party/equation" ) . then ( ( module ) => ( {
@@ -96,25 +96,6 @@ export const loader: LoaderFunction = async ({
96
96
return defer ( { recordMap : recordMapPromise , post } ) ;
97
97
} ;
98
98
99
- export const meta : MetaFunction < typeof loader > = ( {
100
- data,
101
- } : {
102
- data : { post : Post } ;
103
- } ) => {
104
- const { title, content, tags } = data . post ;
105
- const description = `${ content } ; Tags: ${ tags . join ( ", " ) } ` ;
106
- return [
107
- { title : `${ title } | Gleb Khaykin` } ,
108
- { property : "og:title" , content : `${ title } | Gleb Khaykin` } ,
109
- { property : "og:description" , content : description } ,
110
- { property : "og:type" , content : "article" } ,
111
- {
112
- property : "og:image" ,
113
- content : "/img/van_gogh_wheatfield_with_cypresses.jpg" ,
114
- } ,
115
- ] ;
116
- } ;
117
-
118
99
export default function NotionRoute ( ) {
119
100
const { recordMap } = useLoaderData < typeof loader > ( ) ;
120
101
return (
0 commit comments