Changes in reactapp/src/Pages/Subject.js [3b6962d:af801e3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/Pages/Subject.js
r3b6962d raf801e3 28 28 } from "../Components/Styled/Modal.style"; 29 29 import axios from "../api/axios"; 30 import LoadingSpinner from "../Components/Styled/LoadingSpinner.style"; 30 31 31 32 const Subject = () => { … … 46 47 47 48 useEffect(() => { 48 const url = `http://192.168.0. 19:8080/public/subject/${params.subjectId}`;49 const url = `http://192.168.0.29:8080/public/subject/${params.subjectId}`; 49 50 50 51 const fetchData = async () => { … … 83 84 if (!topicTitle.length < 1 && !topicContent.length < 1) { 84 85 const response = await axios( 85 `http://192.168.0. 19:8080/secure/subject/${params.subjectId}/addThread`,86 `http://192.168.0.29:8080/secure/subject/${params.subjectId}/addThread`, 86 87 { 87 88 method: "post", … … 94 95 ); 95 96 setErrorMessage(""); 96 window.location.reload( false);97 window.location.reload(); 97 98 } else { 98 99 setErrorMessage("Полињата за наслов и содржина не смеат да бидат празни"); … … 127 128 </CurrentPageNav> 128 129 <ProfessorCard> 129 <ProfessorCardName>{subject.subjectName} </ProfessorCardName>130 <ProfessorCardName>{subject.subjectName} <span style={{opacity:"50%", fontSize:"16px"}}>#{subject.subjectId}</span></ProfessorCardName> 130 131 <ProfessorCardSeparator /> 131 132 <div style={{ marginTop: "10px" }}> … … 204 205 <div key={subject.subjectId}> 205 206 {topics.map((topic) => { 206 var numReplies = topic.children.length; 207 var numReplies = 0; 208 topic.children.map((c)=>numReplies += ++c.children.length); // ++c.children.length -> c + decata na c 207 209 return ( 208 210 <EntityUl key={topic.postId}> … … 268 270 ) : !fetchError ? ( 269 271 <div> 270 < p style={{ marginTop: "140px" }}>се вчитува...</p>272 <LoadingSpinner style={{ marginTop: "140px" }}/> 271 273 <Outlet /> 272 274 </div>
Note:
See TracChangeset
for help on using the changeset viewer.