Skip to content

Commit

Permalink
add bckg image
Browse files Browse the repository at this point in the history
  • Loading branch information
IvettaDashkova committed Sep 17, 2023
1 parent 3ca832b commit e20531a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ import FirstPage from './pages/FirstPage/FirstPage';
import SecondPage from './pages/SecondPage/SecondPage';
import HalfPage from './pages/HalfPage/HalfPage';
import ErrorPage from './pages/ErrorPage/ErrorPage';
import { AppWrapper } from './App.styled';

const test = import.meta.env.VITE_API_TEST;

function App() {
console.log(test);
return (
<Routes>
<Route path="/" element={<SharedLayout />}>
<Route path="/first" element={<FirstPage />} />
<Route path="/second" element={<SecondPage />}>
<Route path=":half" element={<HalfPage />} />
</Route>
<AppWrapper>
<Routes>
<Route path="/" element={<SharedLayout />}>
<Route path="/first" element={<FirstPage />} />
<Route path="/second" element={<SecondPage />}>
<Route path=":half" element={<HalfPage />} />
</Route>

<Route path="*" element={<ErrorPage />} />
</Route>
</Routes>
<Route path="*" element={<ErrorPage />} />
</Route>
</Routes>
</AppWrapper>
);
}
export default App;
10 changes: 10 additions & 0 deletions src/App.styled.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import styled from '@emotion/styled';
import example from './assets/example.png';

export const AppWrapper = styled.div`
width: 100%;
height: 100vh;
background-image: url(${example});
background-repeat: no-repeat;
background-position: center bottom;
`;

0 comments on commit e20531a

Please sign in to comment.