- Timestamp:
- 09/30/22 15:23:25 (2 years ago)
- Branches:
- main
- Children:
- 8d83180
- Parents:
- 62b653f
- Location:
- reactapp/src
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/App.js
r62b653f rcae16b5 2 2 import SearchResults from "./Pages/SearchResults"; 3 3 import Login from "./Pages/Login"; 4 import Registration from "./Pages/Registration"; 4 5 import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom"; 5 6 import Home from "./Pages/Home"; … … 37 38 const session = Cookies.get("JSESSIONID"); 38 39 if (session) { 39 setAuth(true); // go stava true ako postoi takvo cookie (zasto auth=false na sekoe renderiranje)40 setAuth(true); 40 41 fetchUser(); 41 42 } else { … … 69 70 > 70 71 <Route path="login" element={<Login />}></Route> 72 <Route path="registration" element={<Registration />}></Route> 71 73 <Route path="professor"> 72 74 <Route -
reactapp/src/Components/OpinionTree.js
r62b653f rcae16b5 105 105 { 106 106 method: "post", 107 data: {107 body: { 108 108 content: replyContent, 109 109 }, -
reactapp/src/Components/Styled/Main.style.js
r62b653f rcae16b5 12 12 padding-bottom: 30px; 13 13 width: 80%; 14 box-shadow: 2px 2px 10px #aaaaaa; 14 15 `; 15 16 -
reactapp/src/Pages/Login.js
r62b653f rcae16b5 4 4 import axios from "../api/axios"; 5 5 import Cookies from "js-cookie"; 6 import { LoginButton, LoginInput } from "../Components/Styled/Login.style"; 6 7 const LOGIN_URL = "/login"; 7 8 … … 48 49 <Navigate to="/user_dashboard" /> 49 50 ) : ( 50 <div style={{ marginTop: "140px" }}> 51 <p ref={errRef} className={errMsg ? "errmsg" : "offscreen"}> 52 {errMsg} 53 </p> 54 <h1>Најава</h1> 55 <form onSubmit={handleSubmit}> 56 <label htmlFor="username">E-mail:</label> 57 <input 51 <div 52 style={{ 53 marginTop: "140px", 54 display: "flex", 55 alignItems: "center", 56 flexFlow: "column", 57 width: "fit-content", 58 margin: "auto", 59 border: "2px solid lightgrey", 60 padding: "25px", 61 boxShadow: "2px 2px 6px #aaaaaa", 62 marginBottom: "80px", 63 }} 64 > 65 <h2>Најава</h2> 66 <form 67 onSubmit={handleSubmit} 68 style={{ 69 display: "flex", 70 flexDirection: "column", 71 alignItems: "center", 72 width: "400px", 73 }} 74 > 75 <LoginInput 58 76 type="text" 59 77 id="username" … … 63 81 value={username} 64 82 required 83 placeholder="Email" 65 84 /> 66 <label htmlFor="password">Лозинка:</label> 67 <input 85 <LoginInput 68 86 type="password" 69 87 id="password" 70 88 onChange={(e) => setPassword(e.target.value)} 71 89 value={password} 90 placeholder="Лозинка" 72 91 required 73 92 /> 74 <button>Најави се</button> 93 <LoginButton>Најави се</LoginButton> 94 <p 95 ref={errRef} 96 className={errMsg ? "errmsg" : "offscreen"} 97 style={{ color: "red", marginTop: "20px" }} 98 > 99 {errMsg} 100 </p> 75 101 </form> 102 <p style={{ marginTop: "20px" }}> 103 Немаш сметка? <a href="/registration">Регистрирај се</a>{" "} 104 </p> 76 105 </div> 77 106 ); -
reactapp/src/Pages/UserDashboard.js
r62b653f rcae16b5 24 24 <h3>Кориснички податоци:</h3> 25 25 <UserDetailsCard> 26 <UserDetailsCardContent> 27 <b>Име:</b> {user.fullName}{" "} 28 <i style={{ fontSize: 14, color: "#0066cc" }}> 29 (<u>промени</u>) 30 </i> 31 </UserDetailsCardContent> 26 {user.fullName && ( 27 <UserDetailsCardContent> 28 <b>Име:</b> {user.fullName}{" "} 29 </UserDetailsCardContent> 30 )} 32 31 <UserDetailsCardContent> 33 32 <b>Корисничко име:</b> {user.username}{" "} 34 <i style={{ fontSize: 14, color: "#0066cc" }}>35 (<u>промени</u>)36 </i>37 33 </UserDetailsCardContent> 38 34 <UserDetailsCardContent>
Note:
See TracChangeset
for help on using the changeset viewer.