From 8d6625332df7dcc7bc3cb5572dea131c350710e6 Mon Sep 17 00:00:00 2001 From: amirfakhrullah Date: Fri, 17 Jun 2022 16:34:09 +0800 Subject: [PATCH] fix: header's height & restructure Loader in /loaders --- src/components/Header.tsx | 2 +- src/components/{ => loaders}/Loader.tsx | 4 ++-- src/pages/index.tsx | 2 +- src/pages/posts/[id].tsx | 2 +- src/pages/posts/index.tsx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename src/components/{ => loaders}/Loader.tsx (84%) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index eee6a6d..2e6855a 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -12,7 +12,7 @@ const Header: React.FC<{ return ( <> -
+

BloqDown diff --git a/src/components/Loader.tsx b/src/components/loaders/Loader.tsx similarity index 84% rename from src/components/Loader.tsx rename to src/components/loaders/Loader.tsx index 6170cbc..371e6af 100644 --- a/src/components/Loader.tsx +++ b/src/components/loaders/Loader.tsx @@ -1,6 +1,6 @@ import React from "react"; -import Header from "./Header"; -import MetaHead from "./MetaHead"; +import Header from "../Header"; +import MetaHead from "../MetaHead"; const Loader: React.FC = () => { return ( diff --git a/src/pages/index.tsx b/src/pages/index.tsx index f7e2e0f..eb05970 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,4 @@ -import Loader from "../components/Loader"; +import Loader from "../components/loaders/Loader"; import MetaHead from "../components/MetaHead"; import PostForm from "../components/PostForm"; import PostCard from "../components/PostCard"; diff --git a/src/pages/posts/[id].tsx b/src/pages/posts/[id].tsx index 45ff4b1..2c6b43e 100644 --- a/src/pages/posts/[id].tsx +++ b/src/pages/posts/[id].tsx @@ -1,6 +1,6 @@ import { useRouter } from "next/router"; import React, { useState } from "react"; -import Loader from "../../components/Loader"; +import Loader from "../../components/loaders/Loader"; import MetaHead from "../../components/MetaHead"; import { trpc } from "../../utils/trpc"; import Comments from "../../components/Comments"; diff --git a/src/pages/posts/index.tsx b/src/pages/posts/index.tsx index 7800bc9..50d1fbe 100644 --- a/src/pages/posts/index.tsx +++ b/src/pages/posts/index.tsx @@ -2,7 +2,7 @@ import { useSession } from "next-auth/react"; import React from "react"; import Container from "../../components/Container"; import Header from "../../components/Header"; -import Loader from "../../components/Loader"; +import Loader from "../../components/loaders/Loader"; import MetaHead from "../../components/MetaHead"; import PostButton from "../../components/PostButton"; import PostCard from "../../components/PostCard";