diff --git a/src/App.css b/src/App.css index 5df8839..5118ba4 100644 --- a/src/App.css +++ b/src/App.css @@ -1,6 +1,6 @@ -.App { - margin: 0 auto; - max-width: 575px; - width: 100%; - /* ^^ Temporary constraint so it's mobile view all the time, will remove for tablet/desktop view once we get it */ -} +.App { + margin: 0 auto; + max-width: 700px; + width: 100%; + /* ^^ Temporary constraint so it's mobile view all the time, will remove for tablet/desktop view once we get it */ +} diff --git a/src/App.js b/src/App.js index 8e7911c..a0fb5df 100644 --- a/src/App.js +++ b/src/App.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, useRef } from "react"; import "./App.css"; import HomePage from "./organisms/HomePage"; import CategoryPage from "./organisms/CategoryPage"; @@ -62,6 +62,18 @@ const App = () => { } }, []); + // useEffect(() => { + // document.getElementById("appContainer").addEventListener( + // "click", + // function() { + // document.documentElement.requestFullscreen(); + // screen.orientation.lock("natural"); + // }, + // false + // ); + // console.log(window.screen.orientation.type); + // }, []); + const toggleShutterPress = () => { return setShutterPress(!shutterPress); }; @@ -72,7 +84,7 @@ const App = () => { return ( -
+
diff --git a/src/molecules/BottomNav.jsx b/src/molecules/BottomNav.jsx index 2bb685a..faf96eb 100644 --- a/src/molecules/BottomNav.jsx +++ b/src/molecules/BottomNav.jsx @@ -7,7 +7,7 @@ import { Link, useLocation, useHistory } from "react-router-dom"; import cameraImg from "../images/camera_center_icon.svg"; const Container = styled.div` - max-width: 573px; + max-width: 697px; width: 100vw; height: 56px; @@ -105,7 +105,7 @@ const InnerContainer = styled.div` justify-content: space-between; width: 100%; position: relative; - max-width: 575px; + max-width: 700px; `; const CameraButton = styled.button` diff --git a/src/molecules/CameraNav.jsx b/src/molecules/CameraNav.jsx index 495ef72..36c1f11 100644 --- a/src/molecules/CameraNav.jsx +++ b/src/molecules/CameraNav.jsx @@ -10,7 +10,7 @@ import cameraBtnImgDarkMode from "../images/camera_icon_camera.svg"; import cameraBtnImgLightMode from "../images/camera_icon_camera_light.svg"; const Container = styled.div` - max-width: 575px; + max-width: 700px; width: 100vw; height: 56px; @@ -41,7 +41,7 @@ const InnerContainer = styled.div` justify-content: space-between; width: 100%; position: relative; - max-width: 573px; + max-width: 693px; `; const CameraImage = styled.img` diff --git a/src/organisms/ClusterPage.jsx b/src/organisms/ClusterPage.jsx index 408791b..adf33d2 100644 --- a/src/organisms/ClusterPage.jsx +++ b/src/organisms/ClusterPage.jsx @@ -2,7 +2,7 @@ import React from "react"; import styled from "styled-components"; import { useHistory } from "react-router-dom"; import GridCard from "../molecules/GridCard"; -import placeholderImg from "../images/category_placeholder.svg"; +import placeholderImg from "../images/category_placeholder.png"; const Root = styled.div``; diff --git a/src/organisms/HomePage.jsx b/src/organisms/HomePage.jsx index 2c8324c..6f9a8a4 100644 --- a/src/organisms/HomePage.jsx +++ b/src/organisms/HomePage.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import HomeSearchBar from "../molecules/HomeSearchBar"; import CategoryGrid from "../molecules/CategoryGrid"; import styled from "styled-components"; @@ -16,8 +16,19 @@ const TopContainer = styled.div` `; const HomePage = ({ theme, toggleTheme, searchFocus, toggleSearchFocus }) => { + useEffect(() => { + document.getElementById("homeContainer").addEventListener( + "click", + function() { + document.documentElement.requestFullscreen(); + screen.orientation.lock("natural"); + }, + false + ); + }, []); + return ( - toggleSearchFocus(false)}> + toggleSearchFocus(false)}> { const [step, setStep] = useState(1); const history = useHistory(); + useEffect(() => { + if (step === 3) { + document.getElementById("button").addEventListener( + "click", + function() { + document.documentElement.requestFullscreen(); + screen.orientation.lock("natural"); + }, + false + ); + } + }, [step]); + const handleNext = () => { switch (step) { case 3: { @@ -177,7 +190,7 @@ export const TutorialPage = ({ theme }) => { {renderPage(step, theme)} -