From db6855fbc694f5cefad4f97a5d7b15ab07c37337 Mon Sep 17 00:00:00 2001 From: yude Date: Sat, 11 Dec 2021 18:57:22 +0900 Subject: [PATCH] Remove microCMS --- libs/client.js | 6 ------ pages/posts.js | 56 -------------------------------------------------- 2 files changed, 62 deletions(-) delete mode 100644 libs/client.js delete mode 100644 pages/posts.js diff --git a/libs/client.js b/libs/client.js deleted file mode 100644 index 07e54a2..0000000 --- a/libs/client.js +++ /dev/null @@ -1,6 +0,0 @@ -import { createClient } from 'microcms-js-sdk'; - -export const client = createClient({ - serviceDomain: 'yude', - apiKey: process.env.MICROCMS_API_KEY, -}); \ No newline at end of file diff --git a/pages/posts.js b/pages/posts.js deleted file mode 100644 index e0f107c..0000000 --- a/pages/posts.js +++ /dev/null @@ -1,56 +0,0 @@ -// Base layout -import Layout from "./components/Layout" - -// Next.js -import Link from "next/link"; - -// React -import { useRouter } from 'next/router' - -// i18n -import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n'; - -// microCMS library -import { client } from "../libs/client"; - -// next-seo -import { NextSeo } from 'next-seo'; - -export default function Home({ blog }) { - const { t } = useTranslation(); - const [query] = useLanguageQuery(); - - return ( - <> - - -
-

{t('common:post_list')}

- -
-
- - ); -} - -// Passing data to template -export const getStaticProps = async () => { - const data = await client.get({ endpoint: "blog" }); - - return { - props: { - blog: data.contents, - }, - }; -}; \ No newline at end of file