This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce4a6e1
commit 397421b
Showing
17 changed files
with
201 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,6 @@ yarn-error.log* | |
|
||
# local env files | ||
.env* | ||
|
||
# Local Netlify folder | ||
.netlify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
-- CreateTable | ||
CREATE TABLE "Account" ( | ||
"id" TEXT NOT NULL, | ||
"userId" TEXT NOT NULL, | ||
"type" TEXT NOT NULL, | ||
"provider" TEXT NOT NULL, | ||
"providerAccountId" TEXT NOT NULL, | ||
"refresh_token" TEXT, | ||
"access_token" TEXT, | ||
"expires_at" INTEGER, | ||
"token_type" TEXT, | ||
"scope" TEXT, | ||
"id_token" TEXT, | ||
"session_state" TEXT, | ||
|
||
CONSTRAINT "Account_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Session" ( | ||
"id" TEXT NOT NULL, | ||
"sessionToken" TEXT NOT NULL, | ||
"userId" TEXT NOT NULL, | ||
"expires" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Session_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" TEXT NOT NULL, | ||
"name" TEXT, | ||
"email" TEXT, | ||
"emailVerified" TIMESTAMP(3), | ||
"image" TEXT, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "VerificationToken" ( | ||
"identifier" TEXT NOT NULL, | ||
"token" TEXT NOT NULL, | ||
"expires" TIMESTAMP(3) NOT NULL | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Account" ADD CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Session" ADD CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "postgresql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,8 @@ | |
display: flex; | ||
justify-content: flex-end; | ||
} | ||
|
||
.poweredBy { | ||
white-space: nowrap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
import { BsPatchPlus, BsPatchPlusFill, BsPeopleFill, BsBookFill } from 'react-icons/bs'; | ||
import { IconButton } from '../../common/Button/IconButton'; | ||
import { Popover, PopoverItem } from '../../common/Popover'; | ||
|
||
export function CreatePopover() { | ||
return ( | ||
<Popover | ||
toggle={<IconButton | ||
icon={BsPatchPlus} | ||
hoverIcon={BsPatchPlusFill} | ||
/>} | ||
> | ||
<PopoverItem icon={BsBookFill}> | ||
Create a Strat | ||
</PopoverItem> | ||
<PopoverItem icon={BsPeopleFill}> | ||
Create a Team | ||
</PopoverItem> | ||
</Popover> | ||
); | ||
} |
File renamed without changes.
12 changes: 7 additions & 5 deletions
12
src/components/universal/Login.tsx → src/components/universal/Login/Login.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NextApiRequest, NextApiResponse } from 'next'; | ||
import { unstable_getServerSession } from 'next-auth'; | ||
import { authOptions } from './auth/[...nextauth]'; | ||
|
||
export default async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const {method} = req; | ||
const session = await unstable_getServerSession(req, res, authOptions); | ||
|
||
switch (method) { | ||
case 'GET': | ||
res.end(`Name: ${session.user.name}`); | ||
break; | ||
default: { | ||
res.setHeader('Allow', ['GET', 'PUT']) | ||
res.status(405).end(`Method ${method} Not Allowed`) | ||
} | ||
} | ||
} |