mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
This PR adds support for projects as a first class citizen, and toggling features on in different environments.
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
import useLoading from '../../../hooks/useLoading';
|
|
|
|
import ResetPasswordDetails from '../common/ResetPasswordDetails/ResetPasswordDetails';
|
|
|
|
import { useStyles } from './ResetPassword.styles';
|
|
import { Typography } from '@material-ui/core';
|
|
import ConditionallyRender from '../../common/ConditionallyRender';
|
|
import InvalidToken from '../common/InvalidToken/InvalidToken';
|
|
import useResetPassword from '../../../hooks/api/getters/useResetPassword/useResetPassword';
|
|
import StandaloneLayout from '../common/StandaloneLayout/StandaloneLayout';
|
|
|
|
const ResetPassword = () => {
|
|
const styles = useStyles();
|
|
const { token, loading, setLoading, invalidToken } = useResetPassword();
|
|
const ref = useLoading(loading);
|
|
|
|
return (
|
|
<div ref={ref}>
|
|
<StandaloneLayout>
|
|
<div className={styles.resetPassword}>
|
|
<ConditionallyRender
|
|
condition={invalidToken}
|
|
show={<InvalidToken />}
|
|
elseShow={
|
|
<ResetPasswordDetails
|
|
token={token}
|
|
setLoading={setLoading}
|
|
>
|
|
<Typography
|
|
variant="h2"
|
|
className={styles.title}
|
|
data-loading
|
|
>
|
|
Reset password
|
|
</Typography>
|
|
</ResetPasswordDetails>
|
|
}
|
|
/>
|
|
</div>
|
|
</StandaloneLayout>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ResetPassword;
|