-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement workaroud for password reset (#516)
* Add redirect page for password reset * Allow access to redirect page, center button
- Loading branch information
1 parent
a9d93b3
commit 7745060
Showing
3 changed files
with
44 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import styled from 'styled-components'; | ||
import Head from 'next/head'; | ||
import { getWebTitle } from '@hibiscus/metadata'; | ||
import { useRouter } from 'next/router'; | ||
import { useMemo } from 'react'; | ||
import { Button } from '@hibiscus/ui-kit-2023'; | ||
|
||
export function Index() { | ||
const router = useRouter(); | ||
|
||
// Extract redirect url from the query params | ||
// This is required due to https://github.com/supabase/gotrue/issues/713 | ||
const redirect = useMemo(() => router?.query?.url?.toString(), [router]); | ||
|
||
return ( | ||
<MainPageWrapper> | ||
<Head> | ||
<title>{getWebTitle('Reset your password')}</title> | ||
</Head> | ||
|
||
<CenterDiv> | ||
{redirect && ( | ||
<a href={redirect}> | ||
<Button color="black">Click here to reset your password</Button> | ||
</a> | ||
)} | ||
</CenterDiv> | ||
</MainPageWrapper> | ||
); | ||
} | ||
export default Index; | ||
|
||
const MainPageWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
min-height: 100vh; | ||
`; | ||
|
||
const CenterDiv = styled.div` | ||
margin: auto; | ||
`; |
7745060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
interim – ./
socalhacks.org
interim-hacksc.vercel.app
interim-git-main-hacksc.vercel.app
www.socalhacks.org
7745060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui-kit-2023-storybook – ./
ui-kit-2023-storybook-git-main-hacksc.vercel.app
ui-kit-2023-storybook-hacksc.vercel.app
storybook.hacksc.com
ui-kit-2023-storybook.vercel.app
7745060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
dashboard – ./
dashboard-git-main-hacksc.vercel.app
dashboard-hacksc.vercel.app
dashboard-sable-sigma.vercel.app
dashboard.hacksc.com
7745060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sso – ./
sso-steel.vercel.app
sso-hacksc.vercel.app
sso-git-main-hacksc.vercel.app
sso.hacksc.com
7745060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
recruitment – ./
recruitment-hacksc.vercel.app
recruitment-git-main-hacksc.vercel.app
7745060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
pointr – ./
pointr-git-main-hacksc.vercel.app
pointr.vercel.app
pointr-hacksc.vercel.app
www.hack.sc
7745060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
www-2023 – ./
www-2023.vercel.app
www-2023-git-main-hacksc.vercel.app
www-2023-hacksc.vercel.app
2023.hacksc.com