Skip to content

Commit c988f2b

Browse files
author
Derek Roode
committed
overflow on mobile fixed
1 parent 562f59d commit c988f2b

File tree

8 files changed

+21
-42
lines changed

8 files changed

+21
-42
lines changed

react-app/src/App.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ import ProgressPhotos from "./components/ProgressPhotos/ProgressPhotos";
2121
import About from "./components/About/About";
2222
import ProgressPhotoIndividual from "./components/ProgressPhotoIndividual/ProgressPhotoIndividual";
2323
import Login from "./components/Pages/Login/Login";
24+
import Main from "./components/Pages/Main/Main";
2425

2526
function App() {
2627
const [authenticated, setAuthenticated] = useState(true);
2728
const dispatch = useDispatch();
2829
const [loaded, setLoaded] = useState(false);
2930
const sessionUser = useSelector((state) => state.session.user);
30-
console.log('sessionUser----',sessionUser);
31+
console.log("sessionUser----", sessionUser);
3132

3233
useEffect(() => {
3334
(async () => {
@@ -49,17 +50,14 @@ function App() {
4950
<BrowserRouter>
5051
<Switch>
5152
<Route path="/welcome" exact={true}>
52-
{/* <WelcomePage /> */}
5353
<Login />
5454
</Route>
55-
5655
<>
5756
<NavBar />
58-
5957
<ProtectedRoute path="/" exact={true}>
60-
<User />
58+
<Main />
59+
{/* <User /> */}
6160
</ProtectedRoute>
62-
6361
<Route path="/users" exact={true}>
6462
<UsersList />
6563
</Route>

react-app/src/components/Atoms/Quote/Quote.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect } from "react";
1+
import React, { useState, useEffect } from "react";
22
import styles from "./Quote.module.css";
33

44
function Quote() {

react-app/src/components/Atoms/Quote/Quote.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
width: 100%;
55
max-height: 80px;
66
padding: 0 20px;
7+
max-width: 90vw;
78
}

react-app/src/components/Molecules/NavBarLinks/NavBarLinks.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
.navBar_links_container{
2020
flex-direction: column;
2121
}
22-
22+
2323
.navBar_links_container__mobile{
2424
display: flex;
2525
}
26-
26+
2727
.navBar_links_container__desktop{
2828
display: none;
2929
}

react-app/src/components/Organisms/NavBar/NavBar.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
flex-direction: row;
44
justify-content: space-between;
55
align-items: center;
6-
padding: 0px 20px;
6+
/* padding: 0px 20px; */
77
background-color: black;
88
margin-bottom: 15px;
99
box-shadow: 0px 0px 10px 0px rgba(214, 9, 9, 0.75);
10-
width: 100vw;
10+
width: 100%;
1111

1212

1313

react-app/src/components/Pages/Main/Main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react'
2+
import Quote from '../../Atoms/Quote/Quote'
23

34
function Main() {
45
return (
56
<div>
6-
7+
<Quote/>
78
</div>
89
)
910
}

react-app/src/components/User/User.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,3 @@ hr {
169169
width: 75%;
170170
}
171171

172-
173-
174-
175-
176-
/* .user_container-header-right-links {
177-
text-align: center;
178-
} */
179-
180-
/* #links {
181-
display: flex;
182-
flex-direction: column;
183-
height: 270px;
184-
overflow-y: scroll;
185-
width: 190px;
186-
} */

react-app/src/index.css

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* TODO Add site wide styles */
22

3-
/* #root{
3+
#root{
44
padding: 0px;
55
margin: 0px;
6-
} */
6+
}
77

88
body{
99

@@ -37,18 +37,12 @@ a {
3737
}
3838

3939

40-
#noPhone{
41-
visibility:hidden;
42-
}
43-
44-
45-
@media only screen and (min-width: 100px) and (max-width: 675px) {
46-
.user_container,
47-
.navbar-container{
48-
visibility: hidden;
49-
}
5040

51-
#noPhone{
52-
visibility:visible;
53-
}
41+
/* disable scroll left to right on mobile */
42+
@media screen and (max-width: 600px) {
43+
html,body{
44+
overflow-x: hidden;
45+
overflow-y: auto;
5446
}
47+
}
48+

0 commit comments

Comments
 (0)