Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • reactapp/src/Pages/Subject.js

    r3b6962d raf801e3  
    2828} from "../Components/Styled/Modal.style";
    2929import axios from "../api/axios";
     30import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
    3031
    3132const Subject = () => {
     
    4647
    4748  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}`;
    4950
    5051    const fetchData = async () => {
     
    8384    if (!topicTitle.length < 1 && !topicContent.length < 1) {
    8485      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`,
    8687        {
    8788          method: "post",
     
    9495      );
    9596      setErrorMessage("");
    96       window.location.reload(false);
     97      window.location.reload();
    9798    } else {
    9899      setErrorMessage("Полињата за наслов и содржина не смеат да бидат празни");
     
    127128      </CurrentPageNav>
    128129      <ProfessorCard>
    129         <ProfessorCardName>{subject.subjectName}</ProfessorCardName>
     130        <ProfessorCardName>{subject.subjectName} <span style={{opacity:"50%", fontSize:"16px"}}>#{subject.subjectId}</span></ProfessorCardName>
    130131        <ProfessorCardSeparator />
    131132        <div style={{ marginTop: "10px" }}>
     
    204205      <div key={subject.subjectId}>
    205206        {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
    207209          return (
    208210            <EntityUl key={topic.postId}>
     
    268270  ) : !fetchError ? (
    269271    <div>
    270       <p style={{ marginTop: "140px" }}>се вчитува...</p>
     272      <LoadingSpinner style={{ marginTop: "140px" }}/>
    271273      <Outlet />
    272274    </div>
Note: See TracChangeset for help on using the changeset viewer.