From 92a16b5a05a152335f205353461e58fe3f24b994 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Sun, 6 Mar 2022 17:41:30 -0800 Subject: [PATCH] adjustments --- client/pages/new.tsx | 34 ++++++++++------------------------ client/pages/post/[id].tsx | 2 +- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/client/pages/new.tsx b/client/pages/new.tsx index c047ac11..85256704 100644 --- a/client/pages/new.tsx +++ b/client/pages/new.tsx @@ -1,14 +1,14 @@ import Head from 'next/head' import styles from '../styles/Home.module.css' import HomeComponent from '../components/post' -import { Button, ButtonGroup, Loading, Page } from '@geist-ui/core' -import { Sun, Moon } from '@geist-ui/icons' -import ShiftBy from '../components/shift-by' +import { Loading, Page } from '@geist-ui/core' import useSignedIn from '../lib/hooks/use-signed-in' -import Link from '../components/Link' +import Header from '../components/header' +import { ThemeProps } from './_app' + +const Home = ({ theme, changeTheme }: ThemeProps) => { + const { isSignedIn, isLoading } = useSignedIn({ redirectIfNotAuthed: true }) -const Home = ({ theme, changeTheme }: { theme: "light" | "dark", changeTheme: () => void }) => { - const { isLoading, isSignedIn } = useSignedIn({ redirectIfNotAuthed: true }) return ( @@ -17,27 +17,13 @@ const Home = ({ theme, changeTheme }: { theme: "light" | "dark", changeTheme: () - {isSignedIn && - - - - - - } + +
+ {isLoading && } - {!isLoading && isSignedIn && } + {isSignedIn && } ) diff --git a/client/pages/post/[id].tsx b/client/pages/post/[id].tsx index 67acf87e..65bd7d7a 100644 --- a/client/pages/post/[id].tsx +++ b/client/pages/post/[id].tsx @@ -19,7 +19,7 @@ const Post = ({ post, theme, changeTheme }: Props) => {
- + {post.title} { post.files.map(({ id, content, title }: { id: any, content: string, title: string }) => (