From ae437a097b253e49e19e9ae490f99f1741264e64 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 9 Nov 2022 22:56:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20project=20base?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 13 ++-- components/Header.tsx | 2 +- components/Layout.tsx | 6 +- components/Post.tsx | 2 +- next-env.d.ts | 1 - package-lock.json | 14 ++++ pages/api/auth/[...nextauth].ts | 26 +++---- pages/create.tsx | 2 +- pages/drafts.tsx | 2 +- pages/index.tsx | 2 +- pages/p/[id].tsx | 2 +- prisma/dev.db | Bin 0 -> 57344 bytes .../20221109202932_init/migration.sql | 70 ++++++++++++++++++ prisma/migrations/migration_lock.toml | 3 + 14 files changed, 113 insertions(+), 32 deletions(-) create mode 100644 prisma/dev.db create mode 100644 prisma/migrations/20221109202932_init/migration.sql create mode 100644 prisma/migrations/migration_lock.toml diff --git a/.env b/.env index 9285e7b..1757eb4 100644 --- a/.env +++ b/.env @@ -1,13 +1,14 @@ -SECRET=RANDOM_STRING +SECRET=thetiptop123 NEXTAUTH_URL='http://localhost:3000' # GitHub oAuth GITHUB_ID=YOUR_GITHUB_CLIENT_ID GITHUB_SECRET=YOUR_GITHUB_CLIENT_SECRET +# Google Auth Provider +GOOGLE_CLIENT_ID=5572607706-p6dftn0ss3m2qnvqbhk4khqte8lk7kt3.apps.googleusercontent.com +GOOGLE_CLIENT_SECRET=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 + # Email (magic link) -SMTP_HOST=YOUR_SMTP_HOST -SMTP_PORT=YOUR_SMTP_PORT -SMTP_USER=YOUR_SMTP_USERNAME -SMTP_PASSWORD=YOUR_SMTP_PASSWORD -SMTP_FROM=YOUR_REPLY_TO_EMAIL_ADDRESS +EMAIL_SERVER=smtp://2bfdbee5372880:af828174d7f2ad@smtp.mailtrap.io:2525 +EMAIL_FROM=thetiptop@test.com diff --git a/components/Header.tsx b/components/Header.tsx index 87356f5..5832e00 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import { useRouter } from "next/router"; import { signOut, useSession } from "next-auth/react"; -const Header: React.FC = () => { +const Header = () => { const router = useRouter(); const isActive: (pathname: string) => boolean = (pathname) => router.pathname === pathname; diff --git a/components/Layout.tsx b/components/Layout.tsx index 67ec36a..2d1bbdc 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -2,13 +2,13 @@ import React, { ReactNode } from "react"; import Header from "./Header"; type Props = { - children: ReactNode; + children?: React.ReactNode; }; -const Layout: React.FC = (props) => ( +const Layout = ({children} : Props) => (
-
{props.children}
+
{children}