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