Skip to content

Commit ae8cd0a

Browse files
committed
migrated complete registration and verify email
1 parent 6dd7f27 commit ae8cd0a

5 files changed

Lines changed: 41 additions & 130 deletions

File tree

src/app/screens/CompleteRegistration.tsx renamed to src/app/[locale]/complete-registration/CompleteRegistration.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import * as React from 'react';
24
import Button from '@mui/material/Button';
35
import TextField from '@mui/material/TextField';
@@ -14,15 +16,15 @@ import {
1416
CssBaseline,
1517
FormControlLabel,
1618
} from '@mui/material';
17-
import { useAppDispatch } from '../hooks';
18-
import { refreshUserInformation } from '../store/profile-reducer';
19+
import { useAppDispatch } from '../../hooks';
20+
import { refreshUserInformation } from '../../store/profile-reducer';
1921
import { useRouter, useSearchParams } from 'next/navigation';
2022
import {
2123
selectUserProfileStatus,
2224
selectRegistrationError,
23-
} from '../store/profile-selectors';
25+
} from '../../store/profile-selectors';
2426
import { useSelector } from 'react-redux';
25-
import { ACCOUNT_TARGET, ADD_FEED_TARGET } from '../constants/Navigation';
27+
import { ACCOUNT_TARGET, ADD_FEED_TARGET } from '../../constants/Navigation';
2628

2729
export default function CompleteRegistration(): React.ReactElement {
2830
const auth = getAuth();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { type ReactElement } from 'react';
2+
import CompleteRegistration from './CompleteRegistration';
3+
import { ReduxGateWrapper } from '../../components/ReduxGateWrapper';
4+
import { ProtectedPageWrapper } from '../../components/ProtectedPageWrapper';
5+
6+
export default function CompleteRegistrationPage(): ReactElement {
7+
return (
8+
<ReduxGateWrapper>
9+
<ProtectedPageWrapper targetStatus='authenticated'>
10+
<CompleteRegistration />
11+
</ProtectedPageWrapper>
12+
</ReduxGateWrapper>
13+
);
14+
}

src/app/screens/PostRegistration.tsx renamed to src/app/[locale]/verify-email/PostRegistration.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1+
'use client';
2+
13
import * as React from 'react';
2-
import CssBaseline from '@mui/material/CssBaseline';
34
import Box from '@mui/material/Box';
45
import Container from '@mui/material/Container';
56
import Typography from '@mui/material/Typography';
67
import { EmailOutlined, InfoOutlined, Sync } from '@mui/icons-material';
78
import { Alert, Button } from '@mui/material';
89
import { useDispatch, useSelector } from 'react-redux';
9-
import { emailVerified, verifyEmail } from '../store/profile-reducer';
10+
import { emailVerified, verifyEmail } from '../../store/profile-reducer';
1011
import {
1112
selectEmailVerificationError,
1213
selectIsVerificationEmailSent,
1314
selectUserProfileStatus,
14-
} from '../store/profile-selectors';
15-
import { type ProfileError } from '../types';
16-
import { app } from '../../firebase';
15+
} from '../../store/profile-selectors';
16+
import { type ProfileError } from '../../types';
17+
import { app } from '../../../firebase';
1718
import { useEffect } from 'react';
18-
import { ACCOUNT_TARGET, ADD_FEED_TARGET } from '../constants/Navigation';
19+
import { ACCOUNT_TARGET, ADD_FEED_TARGET } from '../../constants/Navigation';
1920
import { useRouter, useSearchParams } from 'next/navigation';
2021
export default function PostRegistration(): React.ReactElement {
2122
const dispatch = useDispatch();
@@ -69,7 +70,6 @@ export default function PostRegistration(): React.ReactElement {
6970

7071
return (
7172
<Container component='main' maxWidth='sm'>
72-
<CssBaseline />
7373
<Box
7474
sx={{
7575
ml: 2,
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { type ReactElement } from 'react';
2+
import PostRegistration from './PostRegistration';
3+
import { ReduxGateWrapper } from '../../components/ReduxGateWrapper';
4+
import { ProtectedPageWrapper } from '../../components/ProtectedPageWrapper';
5+
6+
export default function VerifyEmailPage(): ReactElement {
7+
return (
8+
<ReduxGateWrapper>
9+
<ProtectedPageWrapper targetStatus='unverified'>
10+
<PostRegistration />
11+
</ProtectedPageWrapper>
12+
</ReduxGateWrapper>
13+
);
14+
}

src/app/screens/ContactInformation.tsx

Lines changed: 0 additions & 119 deletions
This file was deleted.

0 commit comments

Comments
 (0)