Skip to content

Commit bcc6c42

Browse files
committed
fix(links): temporary don't use meta function in blog childern routes
1 parent c34450e commit bcc6c42

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

app/routes/blog.$pageid.tsx

+2-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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";
33
import { NotionAPI } from "notion-client";
44
import React, { lazy, Suspense } from "react";
55
import { ClientOnly } from "remix-utils/client-only";
@@ -14,7 +14,7 @@ import { NotionRenderer } from "vendor/react-notion-x/packages/react-notion-x";
1414

1515
import { Footer } from "~/components/organisms/Footer";
1616
import { Header } from "~/components/organisms/Header";
17-
import { Post, posts } from "~/data/posts";
17+
import { posts } from "~/data/posts";
1818

1919
const Equation = lazy(() =>
2020
import("react-notion-x/build/third-party/equation").then((module) => ({
@@ -96,25 +96,6 @@ export const loader: LoaderFunction = async ({
9696
return defer({ recordMap: recordMapPromise, post });
9797
};
9898

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-
11899
export default function NotionRoute() {
119100
const { recordMap } = useLoaderData<typeof loader>();
120101
return (

0 commit comments

Comments
 (0)