Ignore:
File:
1 edited

Legend:

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

    raf801e3 r3b6962d  
    2828} from "../Components/Styled/Modal.style";
    2929import axios from "../api/axios";
    30 import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
    3130
    3231const Subject = () => {
     
    4746
    4847  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}`;
    5049
    5150    const fetchData = async () => {
     
    8483    if (!topicTitle.length < 1 && !topicContent.length < 1) {
    8584      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`,
    8786        {
    8887          method: "post",
     
    9594      );
    9695      setErrorMessage("");
    97       window.location.reload();
     96      window.location.reload(false);
    9897    } else {
    9998      setErrorMessage("Полињата за наслов и содржина не смеат да бидат празни");
     
    128127      </CurrentPageNav>
    129128      <ProfessorCard>
    130         <ProfessorCardName>{subject.subjectName} <span style={{opacity:"50%", fontSize:"16px"}}>#{subject.subjectId}</span></ProfessorCardName>
     129        <ProfessorCardName>{subject.subjectName}</ProfessorCardName>
    131130        <ProfessorCardSeparator />
    132131        <div style={{ marginTop: "10px" }}>
     
    205204      <div key={subject.subjectId}>
    206205        {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;
    209207          return (
    210208            <EntityUl key={topic.postId}>
     
    270268  ) : !fetchError ? (
    271269    <div>
    272       <LoadingSpinner style={{ marginTop: "140px" }}/>
     270      <p style={{ marginTop: "140px" }}>се вчитува...</p>
    273271      <Outlet />
    274272    </div>
Note: See TracChangeset for help on using the changeset viewer.