Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • reactapp/src/Components/OpinionTree.js

    r3b6962d raf801e3  
    4242
    4343  useEffect(() => {
    44     const url = `http://192.168.0.19:8080/secure/currentUser`;
     44    const url = `http://192.168.0.29:8080/secure/currentUser`;
    4545
    4646    const fetchUser = async () => {
     
    6868      ) {
    6969        const response = await axios(
    70           `http://192.168.0.19:8080/secure/upvoteOpinion/${post.postId}`,
     70          `http://192.168.0.29:8080/secure/upvoteOpinion/${post.postId}`,
    7171          {
    7272            method: "get",
     
    7474          }
    7575        );
    76         window.location.reload(false);
     76        window.location.reload();
    7777      } else {
    7878        return;
     
    9191      ) {
    9292        const response = await axios(
    93           `http://192.168.0.19:8080/secure/downvoteOpinion/${post.postId}`,
     93          `http://192.168.0.29:8080/secure/downvoteOpinion/${post.postId}`,
    9494          {
    9595            method: "get",
     
    9898        );
    9999
    100         window.location.reload(false);
     100        window.location.reload();
    101101      } else {
    102102        return;
     
    131131    if (!replyContent.length < 1) {
    132132      const response = await axios(
    133         `http://192.168.0.19:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`,
     133        `http://192.168.0.29:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`,
    134134        {
    135135          method: "post",
     
    141141      );
    142142      setErrorMessage("");
    143       window.location.reload(false);
     143      window.location.reload();
    144144    } else {
    145145      setErrorMessage("Полето за содржина не смее да биде празно");
     
    161161              {child.content}
    162162            </p>
    163             {child.timePosted === child.timeLastEdited ? (
     163            {new Date(child.timePosted).setMilliseconds(0) === new Date(child.timeLastEdited).setMilliseconds(0) ? (
    164164              <OpinionCardContentTime>
    165165                {dateConverter(
    166166                  new Date(child.timePosted).toString().slice(4, -43)
    167                 )}
     167                )} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>
    168168              </OpinionCardContentTime>
    169169            ) : (
     
    171171                {dateConverter(
    172172                  new Date(child.timeLastEdited).toString().slice(4, -43)
    173                 )}{" "}
     173                )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>{" "}
    174174                (едитирано од модератор)
    175175              </OpinionCardContentTime>
     
    260260                    {opinion.content}
    261261                  </p>
    262                   {opinion.timePosted === opinion.timeLastEdited ? (
     262                  {new Date(opinion.timePosted).setMilliseconds(0) === new Date(opinion.timeLastEdited).setMilliseconds(0) ? (
    263263                    <OpinionCardContentTime>
    264264                      {dateConverter(
    265265                        new Date(opinion.timePosted).toString().slice(4, -43)
    266                       )}
     266                      )} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>
    267267                    </OpinionCardContentTime>
    268268                  ) : (
     
    272272                          .toString()
    273273                          .slice(4, -43)
    274                       )}{" "}
     274                      )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>{" "}
    275275                      (едитирано од модератор)
    276276                    </OpinionCardContentTime>
Note: See TracChangeset for help on using the changeset viewer.