- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/Components/OpinionTree.js
raf801e3 r3b6962d 42 42 43 43 useEffect(() => { 44 const url = `http://192.168.0. 29:8080/secure/currentUser`;44 const url = `http://192.168.0.19:8080/secure/currentUser`; 45 45 46 46 const fetchUser = async () => { … … 68 68 ) { 69 69 const response = await axios( 70 `http://192.168.0. 29:8080/secure/upvoteOpinion/${post.postId}`,70 `http://192.168.0.19:8080/secure/upvoteOpinion/${post.postId}`, 71 71 { 72 72 method: "get", … … 74 74 } 75 75 ); 76 window.location.reload( );76 window.location.reload(false); 77 77 } else { 78 78 return; … … 91 91 ) { 92 92 const response = await axios( 93 `http://192.168.0. 29:8080/secure/downvoteOpinion/${post.postId}`,93 `http://192.168.0.19:8080/secure/downvoteOpinion/${post.postId}`, 94 94 { 95 95 method: "get", … … 98 98 ); 99 99 100 window.location.reload( );100 window.location.reload(false); 101 101 } else { 102 102 return; … … 131 131 if (!replyContent.length < 1) { 132 132 const response = await axios( 133 `http://192.168.0. 29:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`,133 `http://192.168.0.19:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`, 134 134 { 135 135 method: "post", … … 141 141 ); 142 142 setErrorMessage(""); 143 window.location.reload( );143 window.location.reload(false); 144 144 } else { 145 145 setErrorMessage("Полето за содржина не смее да биде празно"); … … 161 161 {child.content} 162 162 </p> 163 { new Date(child.timePosted).setMilliseconds(0) === new Date(child.timeLastEdited).setMilliseconds(0)? (163 {child.timePosted === child.timeLastEdited ? ( 164 164 <OpinionCardContentTime> 165 165 {dateConverter( 166 166 new Date(child.timePosted).toString().slice(4, -43) 167 )} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>167 )} 168 168 </OpinionCardContentTime> 169 169 ) : ( … … 171 171 {dateConverter( 172 172 new Date(child.timeLastEdited).toString().slice(4, -43) 173 )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>{" "}173 )}{" "} 174 174 (едитирано од модератор) 175 175 </OpinionCardContentTime> … … 260 260 {opinion.content} 261 261 </p> 262 { new Date(opinion.timePosted).setMilliseconds(0) === new Date(opinion.timeLastEdited).setMilliseconds(0)? (262 {opinion.timePosted === opinion.timeLastEdited ? ( 263 263 <OpinionCardContentTime> 264 264 {dateConverter( 265 265 new Date(opinion.timePosted).toString().slice(4, -43) 266 )} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>266 )} 267 267 </OpinionCardContentTime> 268 268 ) : ( … … 272 272 .toString() 273 273 .slice(4, -43) 274 )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>{" "}274 )}{" "} 275 275 (едитирано од модератор) 276 276 </OpinionCardContentTime>
Note:
See TracChangeset
for help on using the changeset viewer.