Changeset 3b6962d for reactapp/src/Components
- Timestamp:
- 11/23/22 12:15:28 (2 years ago)
- Branches:
- main
- Children:
- af801e3, e49d1b6
- Parents:
- c68150f
- Location:
- reactapp/src/Components
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/Components/OpinionTree.js
rc68150f r3b6962d 42 42 43 43 useEffect(() => { 44 const url = `http://192.168.0.1 7: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.1 7:8080/secure/upvoteOpinion/${post.postId}`,70 `http://192.168.0.19:8080/secure/upvoteOpinion/${post.postId}`, 71 71 { 72 72 method: "get", … … 91 91 ) { 92 92 const response = await axios( 93 `http://192.168.0.1 7:8080/secure/downvoteOpinion/${post.postId}`,93 `http://192.168.0.19:8080/secure/downvoteOpinion/${post.postId}`, 94 94 { 95 95 method: "get", … … 111 111 setReplyModalDisplay("block"); 112 112 setPostForModal(opinion); 113 document.body.style.overflowY = "hidden"; 113 114 } else { 114 115 navigate("/login"); … … 118 119 const handleModalCloseClick = () => { 119 120 setReplyModalDisplay("none"); 121 document.body.style.overflowY = "auto"; 120 122 }; 121 123 … … 129 131 if (!replyContent.length < 1) { 130 132 const response = await axios( 131 `http://192.168.0.1 7:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`,133 `http://192.168.0.19:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`, 132 134 { 133 135 method: "post", … … 159 161 {child.content} 160 162 </p> 161 <OpinionReplyCardContentTime> 162 {dateConverter( 163 new Date(child.timePosted).toString().slice(4, -43) 164 )} 165 </OpinionReplyCardContentTime> 163 {child.timePosted === child.timeLastEdited ? ( 164 <OpinionCardContentTime> 165 {dateConverter( 166 new Date(child.timePosted).toString().slice(4, -43) 167 )} 168 </OpinionCardContentTime> 169 ) : ( 170 <OpinionCardContentTime> 171 {dateConverter( 172 new Date(child.timeLastEdited).toString().slice(4, -43) 173 )}{" "} 174 (едитирано од модератор) 175 </OpinionCardContentTime> 176 )} 166 177 167 178 <div … … 181 192 (e) => e.vote === "UPVOTE" && e.user.id === user.id 182 193 ) 183 ? "green yellow"194 ? "green" 184 195 : "darkgrey" 185 196 : "darkgrey" … … 249 260 {opinion.content} 250 261 </p> 251 <OpinionCardContentTime> 252 {dateConverter( 253 new Date(opinion.timePosted).toString().slice(4, -43) 254 )} 255 </OpinionCardContentTime> 262 {opinion.timePosted === opinion.timeLastEdited ? ( 263 <OpinionCardContentTime> 264 {dateConverter( 265 new Date(opinion.timePosted).toString().slice(4, -43) 266 )} 267 </OpinionCardContentTime> 268 ) : ( 269 <OpinionCardContentTime> 270 {dateConverter( 271 new Date(opinion.timeLastEdited) 272 .toString() 273 .slice(4, -43) 274 )}{" "} 275 (едитирано од модератор) 276 </OpinionCardContentTime> 277 )} 256 278 257 279 <div … … 273 295 e.vote === "UPVOTE" && e.user.id === user.id 274 296 ) 275 ? "green yellow"297 ? "green" 276 298 : "darkgrey" 277 299 : "darkgrey" … … 343 365 value={replyContent} 344 366 onChange={handleContentChange} 367 spellCheck={false} 345 368 /> 346 369 </label> -
reactapp/src/Components/Search.js
rc68150f r3b6962d 15 15 16 16 useEffect(() => { 17 const url = `http://192.168.0.1 7:8080/public/professors/nameContains/${transliterate(17 const url = `http://192.168.0.19:8080/public/professors/nameContains/${transliterate( 18 18 query 19 19 )}`; -
reactapp/src/Components/Styled/Modal.style.js
rc68150f r3b6962d 28 28 top: 0; 29 29 width: 100%; 30 height: auto;30 height: 100%; 31 31 overflow: auto; 32 32 background-color: rgb(0, 0, 0); … … 47 47 export const ModalContent = styled.div` 48 48 background-color: #fefefe; 49 margin: 15% auto;49 margin: 2% auto; 50 50 padding: 20px; 51 51 border: 1px solid #888; … … 107 107 padding: 12px 16px; 108 108 border: 1px solid #ccc; 109 font-family: inherit; 109 110 `; 110 111 … … 116 117 border: 1px solid #ccc; 117 118 resize: none; 119 font-family: inherit; 118 120 `; -
reactapp/src/Components/UserHeader.js
rc68150f r3b6962d 10 10 11 11 useEffect(() => { 12 const url = `http://192.168.0.1 7:8080/secure/currentUser`;12 const url = `http://192.168.0.19:8080/secure/currentUser`; 13 13 14 14 const fetchUser = async () => {
Note:
See TracChangeset
for help on using the changeset viewer.