-
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.
HOSTSD-254 Add preapproved user (#111)
- Loading branch information
Showing
13 changed files
with
222 additions
and
90 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 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 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 |
---|---|---|
@@ -1,15 +1,44 @@ | ||
'use client'; | ||
|
||
import { LoadingAnimation } from '@/components'; | ||
import { useAuth } from '@/hooks'; | ||
import { useAppStore } from '@/store'; | ||
import { redirect } from 'next/navigation'; | ||
import styles from './Welcome.module.scss'; | ||
|
||
export default function Page() { | ||
const { isAuthorized } = useAuth(); | ||
const userinfo = useAppStore((state) => state.userinfo); | ||
|
||
// Need this because after activating a pre-authorized user so that it will redirect to their home page. | ||
if (isAuthorized) redirect('/'); | ||
|
||
return ( | ||
<div className={`dashboardContainer ${styles.container}`}> | ||
<div className={styles.welcome}> | ||
<h2>Request Access</h2> | ||
<p>Please email <a href="mailto:[email protected]">[email protected]</a> to request access to your organization's dashboard</p> | ||
<p> | ||
Please email <a href="mailto:[email protected]">[email protected]</a> to request | ||
access to your organization's dashboard | ||
</p> | ||
{!userinfo && ( | ||
<div className={styles.activate}> | ||
<div> | ||
Activating account. If account has been pre-approved it will automatically apply roles | ||
and redirect to home page. | ||
</div> | ||
<div> | ||
<LoadingAnimation /> | ||
</div> | ||
</div> | ||
)} | ||
{userinfo && !userinfo.roles.length && ( | ||
<div className={styles.activate}>Your account has not be pre-approved.</div> | ||
)} | ||
</div> | ||
<div className={styles.login}> | ||
<h2>Welcome to the Storage Dashboard</h2> | ||
<p>Sign in to get insights into your organization's data storage and usage.</p> | ||
<p>Request access to get insights into your organization's data storage and usage.</p> | ||
</div> | ||
</div> | ||
); | ||
|
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
Oops, something went wrong.