source: reactapp/src/Pages/Home.js@ 62b653f

main
Last change on this file since 62b653f was 6221ab6, checked in by unknown <mlviktor23@…>, 23 months ago

finished add post func. in react, fixed user dashboard details not loading upon login redirect

  • Property mode set to 100644
File size: 1010 bytes
Line 
1import React, { useContext } from "react";
2import { MainWrapper, MainTitle } from "../Components/Styled/Main.style";
3import { Outlet } from "react-router-dom";
4import Search from "../Components/Search";
5import UserHeader from "../Components/UserHeader";
6import AuthApi from "../api/AuthApi";
7
8function Home({ user, userLoaded }) {
9 const { auth, setAuth } = useContext(AuthApi);
10
11 return (
12 <MainWrapper>
13 <style>
14 @import
15 url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
16 </style>
17 <style>
18 {
19 "body { background-color: papayawhip;} * {margin: 0; padding: 0; box-sizing: border-box;}"
20 }
21 </style>
22 <a href="/">
23 <MainTitle>profesori.mk</MainTitle>
24 </a>{" "}
25 <Search />
26 {auth && <UserHeader user={user} userLoaded={userLoaded} />}
27 <div style={{ marginTop: "140px" }}></div>
28 <Outlet />
29 </MainWrapper>
30 );
31}
32
33export default Home;
Note: See TracBrowser for help on using the repository browser.