-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from Rubix982/redirect-fix
Redirect fix
- Loading branch information
Showing
14 changed files
with
119 additions
and
77 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,18 +1,26 @@ | ||
import React from 'react'; | ||
import React, { useContext } from 'react'; | ||
import Template from '../components/Login-Register-FP/template'; | ||
import { MainContent } from '../components/FirstLogin/MainContent'; | ||
import ImageSource from '../assets/FirstLogin/firstLogin.jpg'; | ||
import { loginUserContext } from '../components/LoginUserContext'; | ||
import Feed from './feed'; | ||
|
||
const FirstLogin = () => { | ||
const { login, firstLogin } = useContext(loginUserContext); | ||
|
||
const LeftAlignStyle = { | ||
overflowY: 'scroll', | ||
}; | ||
|
||
return ( | ||
<Template bgUrl={ImageSource} style={LeftAlignStyle}> | ||
<MainContent /> | ||
</Template> | ||
); | ||
if (login.state && firstLogin.state) { | ||
return ( | ||
<Template bgUrl={ImageSource} style={LeftAlignStyle}> | ||
<MainContent /> | ||
</Template> | ||
); | ||
} | ||
|
||
return (<Feed />); | ||
}; | ||
|
||
export default FirstLogin; |
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,11 +1,22 @@ | ||
import React from 'react'; | ||
import React, { useContext } from 'react'; | ||
import Template from '../components/Login-Register-FP/template'; | ||
import MainContent from '../components/Login/MainContent'; | ||
import { loginUserContext } from '../components/LoginUserContext'; | ||
import Feed from './feed'; | ||
|
||
const Login = () => ( | ||
<Template> | ||
<MainContent /> | ||
</Template> | ||
); | ||
const Login = () => { | ||
const { login } = useContext(loginUserContext); | ||
|
||
if(!login.state) { | ||
return ( | ||
<Template> | ||
<MainContent /> | ||
</Template> | ||
); | ||
} | ||
|
||
return (<Feed/>); | ||
|
||
}; | ||
|
||
export default Login; |
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,24 +1,30 @@ | ||
import React, { useContext } from 'react'; | ||
import Container from '../components/FullViewContainer'; | ||
import MainContent from '../components/NewsFeed/MainContent'; | ||
import FirstLogin from './FirstLogin.js'; | ||
|
||
import { loginUserContext } from '../components/LoginUserContext'; | ||
// the div is for navbar | ||
import Navbar from '../components/Navbar'; | ||
import Home from './home'; | ||
|
||
const Feed = () => { | ||
const { login } = useContext(loginUserContext); | ||
|
||
return ( | ||
<Container | ||
style={{ | ||
backgroundColor: '#18191a', | ||
display: 'grid', | ||
gridTemplateRows: '10% 90%', | ||
}} | ||
> | ||
<Navbar first_name="Tashik" title="Terrabuzz" /> | ||
<MainContent /> | ||
</Container>) | ||
if (login.state) { | ||
return ( | ||
<Container | ||
style={{ | ||
backgroundColor: '#18191a', | ||
display: 'grid', | ||
gridTemplateRows: '10% 90%', | ||
}} | ||
> | ||
<Navbar first_name="Tashik" title="Terrabuzz" /> | ||
<MainContent /> | ||
</Container> | ||
) | ||
} | ||
|
||
return (<Home />); | ||
}; | ||
|
||
export default Feed; |
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,20 +1,30 @@ | ||
import React from 'react'; | ||
import React, { useContext } from 'react'; | ||
|
||
// Component imports | ||
import MainContent from '../components/Publish/MainContent'; | ||
import PublishHeader from '../components/Publish/PublishHeader'; | ||
import PublishProvider from '../components/Publish/PublishContext'; | ||
import { loginUserContext } from '../components/LoginUserContext'; | ||
import Home from './home'; | ||
|
||
// Styling | ||
import PublishStyling from '../style/Publish/Publish.module.css'; | ||
|
||
const Publish = () => ( | ||
<PublishProvider> | ||
<div className={PublishStyling.container}> | ||
<PublishHeader /> | ||
<MainContent /> | ||
</div> | ||
</PublishProvider> | ||
); | ||
const Publish = () => { | ||
const { login } = useContext(loginUserContext); | ||
|
||
if(login.state) { | ||
return ( | ||
<PublishProvider> | ||
<div className={PublishStyling.container}> | ||
<PublishHeader /> | ||
<MainContent /> | ||
</div> | ||
</PublishProvider> | ||
); | ||
} | ||
|
||
return (<Home />); | ||
}; | ||
|
||
export default Publish; |
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
Oops, something went wrong.
086c354
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: