-
-
Notifications
You must be signed in to change notification settings - Fork 783
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replaces next-auth with clerk & adds privacy policy (#260)
- Loading branch information
Showing
25 changed files
with
510 additions
and
613 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
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 was deleted.
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
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { UserButton } from '@clerk/nextjs'; | ||
|
||
import { type NextPageWithLayout } from '../../utils/NextPageWithLayout'; | ||
|
||
const AppPage: NextPageWithLayout = () => { | ||
return ( | ||
<main> | ||
<h1>Welcome to Noodle's application</h1> | ||
<UserButton afterSignOutUrl="/" /> | ||
</main> | ||
); | ||
}; | ||
|
||
export default AppPage; |
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,23 @@ | ||
import { useEffect } from 'react'; | ||
import { type NextPage } from 'next'; | ||
|
||
const PrivacyPage: NextPage = () => { | ||
useEffect(() => { | ||
const script = document.createElement('script'); | ||
script.src = 'https://app.termly.io/embed-policy.min.js'; | ||
script.async = true; | ||
document.body.appendChild(script); | ||
}, []); | ||
|
||
return ( | ||
<div | ||
/* | ||
// @ts-expect-error it needs this attribute */ | ||
name="termly-embed" | ||
data-id="bccd9db6-3bed-4b7b-acae-35aecd4db216" | ||
data-type="iframe" | ||
/> | ||
); | ||
}; | ||
|
||
export default PrivacyPage; |
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,36 @@ | ||
import { SignIn } from '@clerk/nextjs'; | ||
import { dark } from '@clerk/themes'; | ||
import { useTheme } from 'next-themes'; | ||
|
||
import { type NextPageWithLayout } from '../../utils/NextPageWithLayout'; | ||
|
||
const SignInPage: NextPageWithLayout = () => { | ||
const { resolvedTheme } = useTheme(); | ||
|
||
return ( | ||
<main className="container mx-auto flex min-h-screen items-center justify-center"> | ||
<SignIn | ||
appearance={{ | ||
baseTheme: | ||
resolvedTheme === 'dark' ? dark : { __type: 'prebuilt_appearance' }, | ||
elements: { | ||
formButtonPrimary: 'hover:bg-primary-900 transition-colors', | ||
formFieldInput: | ||
'bg-gray-2 dark:bg-graydark-2 border-gray-6 dark:border-graydark-6', | ||
card: 'bg-gray-1 dark:bg-graydark-1 border border-gray-4 dark:border-graydark-4 shadow-none', | ||
}, | ||
layout: { | ||
privacyPageUrl: '/privacy', | ||
termsPageUrl: '/terms', | ||
socialButtonsPlacement: 'bottom', | ||
}, | ||
variables: { | ||
colorPrimary: '#e64d67', | ||
}, | ||
}} | ||
/> | ||
</main> | ||
); | ||
}; | ||
|
||
export default SignInPage; |
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,36 @@ | ||
import { SignUp } from '@clerk/nextjs'; | ||
import { dark } from '@clerk/themes'; | ||
import { useTheme } from 'next-themes'; | ||
|
||
import { type NextPageWithLayout } from '../../utils/NextPageWithLayout'; | ||
|
||
const SignUpPage: NextPageWithLayout = () => { | ||
const { resolvedTheme } = useTheme(); | ||
|
||
return ( | ||
<main className="container mx-auto flex min-h-screen items-center justify-center"> | ||
<SignUp | ||
appearance={{ | ||
baseTheme: | ||
resolvedTheme === 'dark' ? dark : { __type: 'prebuilt_appearance' }, | ||
elements: { | ||
formButtonPrimary: 'hover:bg-primary-900 transition-colors', | ||
formFieldInput: | ||
'bg-gray-2 dark:bg-graydark-2 border-gray-6 dark:border-graydark-6', | ||
card: 'bg-gray-1 dark:bg-graydark-1 border border-gray-4 dark:border-graydark-4 shadow-none', | ||
}, | ||
layout: { | ||
privacyPageUrl: '/privacy', | ||
termsPageUrl: '/terms', | ||
socialButtonsPlacement: 'bottom', | ||
}, | ||
variables: { | ||
colorPrimary: '#e64d67', | ||
}, | ||
}} | ||
/> | ||
</main> | ||
); | ||
}; | ||
|
||
export default SignUpPage; |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.