Changeset af801e3 for reactapp/src/Components
- Timestamp:
- 12/08/22 22:44:02 (2 years ago)
- Branches:
- main
- Children:
- a5aba17
- Parents:
- 3b6962d
- Location:
- reactapp/src/Components
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/Components/OpinionTree.js
r3b6962d raf801e3 42 42 43 43 useEffect(() => { 44 const url = `http://192.168.0. 19:8080/secure/currentUser`;44 const url = `http://192.168.0.29:8080/secure/currentUser`; 45 45 46 46 const fetchUser = async () => { … … 68 68 ) { 69 69 const response = await axios( 70 `http://192.168.0. 19:8080/secure/upvoteOpinion/${post.postId}`,70 `http://192.168.0.29:8080/secure/upvoteOpinion/${post.postId}`, 71 71 { 72 72 method: "get", … … 74 74 } 75 75 ); 76 window.location.reload( false);76 window.location.reload(); 77 77 } else { 78 78 return; … … 91 91 ) { 92 92 const response = await axios( 93 `http://192.168.0. 19:8080/secure/downvoteOpinion/${post.postId}`,93 `http://192.168.0.29:8080/secure/downvoteOpinion/${post.postId}`, 94 94 { 95 95 method: "get", … … 98 98 ); 99 99 100 window.location.reload( false);100 window.location.reload(); 101 101 } else { 102 102 return; … … 131 131 if (!replyContent.length < 1) { 132 132 const response = await axios( 133 `http://192.168.0. 19:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`,133 `http://192.168.0.29:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`, 134 134 { 135 135 method: "post", … … 141 141 ); 142 142 setErrorMessage(""); 143 window.location.reload( false);143 window.location.reload(); 144 144 } else { 145 145 setErrorMessage("Полето за содржина не смее да биде празно"); … … 161 161 {child.content} 162 162 </p> 163 { child.timePosted === child.timeLastEdited? (163 {new Date(child.timePosted).setMilliseconds(0) === new Date(child.timeLastEdited).setMilliseconds(0) ? ( 164 164 <OpinionCardContentTime> 165 165 {dateConverter( 166 166 new Date(child.timePosted).toString().slice(4, -43) 167 )} 167 )} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span> 168 168 </OpinionCardContentTime> 169 169 ) : ( … … 171 171 {dateConverter( 172 172 new Date(child.timeLastEdited).toString().slice(4, -43) 173 )}{" "} 173 )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>{" "} 174 174 (едитирано од модератор) 175 175 </OpinionCardContentTime> … … 260 260 {opinion.content} 261 261 </p> 262 { opinion.timePosted === opinion.timeLastEdited? (262 {new Date(opinion.timePosted).setMilliseconds(0) === new Date(opinion.timeLastEdited).setMilliseconds(0) ? ( 263 263 <OpinionCardContentTime> 264 264 {dateConverter( 265 265 new Date(opinion.timePosted).toString().slice(4, -43) 266 )} 266 )} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span> 267 267 </OpinionCardContentTime> 268 268 ) : ( … … 272 272 .toString() 273 273 .slice(4, -43) 274 )}{" "} 274 )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>{" "} 275 275 (едитирано од модератор) 276 276 </OpinionCardContentTime> -
reactapp/src/Components/Search.js
r3b6962d raf801e3 15 15 16 16 useEffect(() => { 17 const url = `http://192.168.0. 19:8080/public/professors/nameContains/${transliterate(17 const url = `http://192.168.0.29:8080/public/professors/nameContains/${transliterate( 18 18 query 19 19 )}`; -
reactapp/src/Components/Styled/ProfessorCard.style.js
r3b6962d raf801e3 2 2 3 3 export const ProfessorCard = styled.div` 4 background-color: cornsilk;5 4 width: auto; 6 5 padding: 10px; -
reactapp/src/Components/UserHeader.js
r3b6962d raf801e3 3 3 import axios from "../api/axios"; 4 4 import Logout from "./Logout"; 5 import LoadingSpinner from "./Styled/LoadingSpinner.style"; 5 6 6 7 function UserHeader({}) { … … 10 11 11 12 useEffect(() => { 12 const url = `http://192.168.0. 19:8080/secure/currentUser`;13 const url = `http://192.168.0.29:8080/secure/currentUser`; 13 14 14 15 const fetchUser = async () => { … … 34 35 ) : ( 35 36 <div style={{ float: "left", marginTop: 25, marginLeft: 60 }}> 36 се вчитува...37 <LoadingSpinner/> 37 38 </div> 38 39 );
Note:
See TracChangeset
for help on using the changeset viewer.