Skip to content

Commit 4f48bf1

Browse files
committed
refactor
1 parent d7ba046 commit 4f48bf1

File tree

33 files changed

+395
-40
lines changed

33 files changed

+395
-40
lines changed

src/components/NavBar/NavBar.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,17 @@ export const NavBar: React.FC = () => {
3838
Sign-up
3939
</Link>
4040
{user && (
41-
<Link className="menu-item" to={'/set-profile-data'}>
42-
Set profile data
43-
</Link>
41+
<>
42+
<Link className="menu-item" to={'/set-profile-data'}>
43+
Set profile data
44+
</Link>
45+
<Link className="menu-item" to={'/get-profile-data'}>
46+
Get profile data
47+
</Link>
48+
<Link className="menu-item" to={'/update-profile-data'}>
49+
Update profile data
50+
</Link>
51+
</>
4452
)}
4553
</div>
4654
</div>

src/index.tsx

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import { StoreContext } from 'redux-react-hook';
4-
import { Router, Switch, Route } from 'react-router-dom';
4+
import { Route, Router, Switch } from 'react-router-dom';
55
import { history } from './history';
66
import { store } from './store';
7+
import * as serviceWorker from './serviceWorker';
8+
import { NavBar } from './components/NavBar/NavBar';
9+
import {
10+
SignIn,
11+
SignUp,
12+
SignInWithPopUp,
13+
SetProfileData,
14+
PageNotFound,
15+
GetProfileData,
16+
UpdateProfileData,
17+
} from './pages';
18+
import { toast, ToastContainer } from 'react-toastify';
19+
720
import './styles/index/css-styles-reset.scss';
821
import './styles/index/main.scss';
922

1023
import 'react-toastify/dist/ReactToastify.css';
1124

12-
import * as serviceWorker from './serviceWorker';
13-
import { NavBar } from './components/NavBar/NavBar';
14-
import { SignIn } from './pages/SignIn/SignIn';
15-
import { SignUp } from './pages/SignUp/SignUp';
16-
import { toast, ToastContainer } from 'react-toastify';
17-
import { SignInWithPopUp } from './pages/SignInWithPopUp/SignInWithPopUp';
18-
import { SetProfileData } from './pages/SetProfileData/SetProfileData';
19-
import { PageNotFound } from './pages/PageNotFound/PageNotFound';
20-
2125
// Call it once in your app. At the root of your app is the best place
2226
toast.configure();
2327

@@ -31,6 +35,9 @@ ReactDOM.render(
3135
<Route path="/sign-in" exact={true} component={SignIn} />
3236
<Route path="/sign-in-with-popup" exact={true} component={SignInWithPopUp} />
3337
<Route path="/set-profile-data" exact={true} component={SetProfileData} />
38+
<Route path="/get-profile-data" exact={true} component={GetProfileData} />
39+
<Route path="/get-profile-data" exact={true} component={GetProfileData} />
40+
<Route path="/update-profile-data" exact={true} component={UpdateProfileData} />
3441
<Route component={PageNotFound} />
3542
</Switch>
3643
</Router>

src/pages/PageNotFound/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { PageNotFound } from './PageNotFound';
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { useState } from 'react';
2-
import firebaseImage from '../../assets/firebase.png';
2+
import firebaseImage from '../../../assets/firebase.png';
33
import { useDispatch } from 'redux-react-hook';
44

55
import './signIn.scss';
6-
import { signIn } from '../../store/auth/signIn';
7-
import { firebase_app } from '../../api/firebase';
6+
import { signIn } from '../../../store/auth/signIn';
7+
import { firebase_app } from '../../../api/firebase';
88

99
export const SignIn: React.FC = () => {
1010
const [email, setEmail] = useState<string>('');

src/pages/auth/SignIn/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { SignIn } from './SignIn';

src/pages/SignInWithPopUp/SignInWithPopUp.tsx renamed to src/pages/auth/SignInWithPopUp/SignInWithPopUp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
2-
import firebaseImage from '../../assets/firebase.png';
2+
import firebaseImage from '../../../assets/firebase.png';
33
import { useDispatch } from 'redux-react-hook';
4-
import { signInPopup } from '../../store/auth/signInWithPopUp';
4+
import { signInPopup } from '../../../store/auth/signInWithPopUp';
55

66
import './signInWithPopup.scss';
77

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { SignInWithPopUp } from './SignInWithPopUp';
File renamed without changes.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React, { useState } from 'react';
2-
import firebaseImage from '../../assets/firebase.png';
2+
import firebaseImage from '../../../assets/firebase.png';
33
import { useDispatch } from 'redux-react-hook';
44

5+
import { signUp } from '../../../store/auth/signUp';
6+
57
import './signUp.scss';
6-
import { signUp } from '../../store/auth/signUp';
78

89
export const SignUp: React.FC = () => {
910
const [email, setEmail] = useState<string>('');

0 commit comments

Comments
 (0)