Index: reactapp/.idea/.gitignore
===================================================================
--- reactapp/.idea/.gitignore	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,5 +1,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
Index: reactapp/.idea/inspectionProfiles/Project_Default.xml
===================================================================
--- reactapp/.idea/inspectionProfiles/Project_Default.xml	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,6 +1,0 @@
-<component name="InspectionProjectProfileManager">
-  <profile version="1.0">
-    <option name="myName" value="Project Default" />
-    <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
-  </profile>
-</component>
Index: reactapp/.idea/modules.xml
===================================================================
--- reactapp/.idea/modules.xml	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,8 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/reactapp.iml" filepath="$PROJECT_DIR$/.idea/reactapp.iml" />
-    </modules>
-  </component>
-</project>
Index: reactapp/.idea/reactapp.iml
===================================================================
--- reactapp/.idea/reactapp.iml	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,12 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="WEB_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/temp" />
-      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
-      <excludeFolder url="file://$MODULE_DIR$/tmp" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>
Index: reactapp/.idea/vcs.xml
===================================================================
--- reactapp/.idea/vcs.xml	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,6 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
-  </component>
-</project>
Index: reactapp/README.md
===================================================================
--- reactapp/README.md	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
+++ reactapp/README.md	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -0,0 +1,70 @@
+# Getting Started with Create React App
+
+This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### `npm start`
+
+Runs the app in the development mode.\
+Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
+
+The page will reload when you make changes.\
+You may also see any lint errors in the console.
+
+### `npm test`
+
+Launches the test runner in the interactive watch mode.\
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
+
+### `npm run build`
+
+Builds the app for production to the `build` folder.\
+It correctly bundles React in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.\
+Your app is ready to be deployed!
+
+See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
+
+### `npm run eject`
+
+**Note: this is a one-way operation. Once you `eject`, you can't go back!**
+
+If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
+
+Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
+
+You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
+
+## Learn More
+
+You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
+
+To learn React, check out the [React documentation](https://reactjs.org/).
+
+### Code Splitting
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
+
+### Analyzing the Bundle Size
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
+
+### Making a Progressive Web App
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
+
+### Advanced Configuration
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
+
+### Deployment
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
+
+### `npm run build` fails to minify
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
Index: reactapp/public/index.html
===================================================================
--- reactapp/public/index.html	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/public/index.html	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -3,5 +3,5 @@
   <head>
     <meta charset="utf-8" />
-    <link rel="icon" href="%PUBLIC_URL%/favicon.ico?v=2" />
+    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
     <meta name="theme-color" content="#000000" />
Index: reactapp/src/App.js
===================================================================
--- reactapp/src/App.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/App.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -2,29 +2,41 @@
 import SearchResults from "./Pages/SearchResults";
 import Login from "./Pages/Login";
-import Registration from "./Pages/Registration";
 import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
-import Root from "./Components/Root";
+import Home from "./Pages/Home";
 import UserDashboard from "./Pages/UserDashboard";
-import Subject from "./Pages/Subject";
-import University from "./Pages/University";
-import Faculty from "./Pages/Faculty";
 import { useEffect, useState, useMemo } from "react";
 import AuthApi from "./api/AuthApi";
 import Cookies from "js-cookie";
-import NotFound from "./Pages/NotFound";
-import Topic from "./Pages/Topic";
-import LoadingSpinner from "./Components/Styled/LoadingSpinner.style";
-import Home from "./Pages/Home";
-import PublicUserProfile from "./Pages/PublicUserProfile";
+import axios from "./api/axios";
+import JSOG from "jsog";
 
 export default function App() {
   const [auth, setAuth] = useState(false);
+  const [user, setUser] = useState(null);
+  const [userLoaded, setUserLoaded] = useState(false);
   const variableAuth = useMemo(() => ({ auth, setAuth }), [auth]);
   const [authLoaded, setAuthLoaded] = useState(false);
+
+  const fetchUser = async () => {
+    try {
+      const response = await axios.get(
+        "http://192.168.0.17:8080/secure/currentUser",
+        { withCredentials: true }
+      );
+      var cyclicGraph = await response.data;
+      var jsogStructure = JSOG.encode(cyclicGraph);
+      cyclicGraph = JSOG.decode(jsogStructure);
+      setUser(cyclicGraph);
+      setUserLoaded(true);
+    } catch (error) {
+      console.log("Fetching error", error);
+    }
+  };
 
   const readCookie = async () => {
     const session = Cookies.get("JSESSIONID");
     if (session) {
-      setAuth(true);
+      setAuth(true); // go stava true ako postoi takvo cookie (zasto auth=false na sekoe renderiranje)
+      fetchUser();
     } else {
       setAuth(false);
@@ -34,5 +46,4 @@
 
   useEffect(() => {
-    document.title = "profesori.mk";
     readCookie();
   }, []);
@@ -45,5 +56,5 @@
       return children;
     } else {
-      return <LoadingSpinner/>;
+      return <div>се вчитува cookie...</div>;
     }
   };
@@ -53,25 +64,25 @@
       <BrowserRouter>
         <Routes>
-          <Route path="/" element={<Root />}>
-            <Route path="/" element={<Home/>}/>
+          <Route
+            path="/"
+            element={<Home user={user} userLoaded={userLoaded} />}
+          >
             <Route path="login" element={<Login />}></Route>
-            <Route path="registration" element={<Registration />}></Route>
             <Route path="professor">
-              <Route path=":professorId" element={<Professor />} />
+              <Route
+                path=":professorId"
+                element={<Professor user={user} userLoaded={userLoaded} />}
+              />
             </Route>
-            <Route path="university/:universityId" element={<University />} />
-            <Route path="user/:userId" element={<PublicUserProfile />} />
-            <Route path="faculty/:facultyId" element={<Faculty />} />
-            <Route path="subject/:subjectId" element={<Subject />} />
-            <Route path="topic/:topicId" element={<Topic />} />
             <Route path="search" element={<SearchResults />}></Route>
             <Route
               path="user_dashboard"
               element={
-                <ProtectedRoute auth={auth}>{<UserDashboard />}</ProtectedRoute>
+                <ProtectedRoute auth={auth}>
+                  {<UserDashboard user={user} userLoaded={userLoaded} />}
+                </ProtectedRoute>
               }
             ></Route>
           </Route>
-          <Route path="*" element={<NotFound />} />
         </Routes>
       </BrowserRouter>
Index: reactapp/src/Components/Logout.js
===================================================================
--- reactapp/src/Components/Logout.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/Logout.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -3,4 +3,5 @@
 import Cookies from "js-cookie";
 import { LogoutButton } from "./Styled/UserDetails.style";
+import { Navigate } from "react-router-dom";
 
 function Logout() {
@@ -12,5 +13,5 @@
   };
 
-  return <LogoutButton onClick={handleLogout} style={{color:"black"}}>Одјави се</LogoutButton>;
+  return <LogoutButton onClick={handleLogout}>Одјави се</LogoutButton>;
 }
 
Index: reactapp/src/Components/OpinionTree.js
===================================================================
--- reactapp/src/Components/OpinionTree.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/OpinionTree.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -3,4 +3,5 @@
   OpinionCardContent,
   OpinionCardContentTime,
+  OpinionCardContentTitle,
   OpinionReplyCard,
   OpinionReplyCardContent,
@@ -13,6 +14,5 @@
 import AuthApi from "../api/AuthApi";
 import { useNavigate } from "react-router-dom";
-import { useContext, useState, useEffect } from "react";
-import JSOG from "jsog";
+import { useContext, useState } from "react";
 import {
   Modal,
@@ -26,60 +26,63 @@
 import axios from "../api/axios";
 
-const OpinionTree = ({professor, relatedOpinions}) => {
+function OpinionTree({ professor, user, userLoaded }) {
   var renderedOpinionIds = [];
   var postCount; // za da ne go pokazuva ispod postot
 
+  let navigate = useNavigate();
   const { auth, setAuth } = useContext(AuthApi);
-  let navigate = useNavigate();
-
-  const [replyModalDisplay, setReplyModalDisplay] = useState("none");
+
+  let [replyModalDisplay, setReplyModalDisplay] = useState("none");
   const [replyContent, setReplyContent] = useState("");
-  const [postForReplyModal, setPostForReplyModal] = useState(null);
-  const [reportModalDisplay, setReportModalDisplay] = useState("none");
-  const [reportContent, setReportContent] = useState("")
-  const [postForReportModal, setPostForReportModal] = useState(null);
-
-  const [user, setUser] = useState(null);
-  const [loadedUser, setLoadedUser] = useState(false);
-  const [fetchError, setFetchError] = useState(false);
-  const [errorMessage, setErrorMessage] = useState("");
-
-  useEffect(() => {
-    const url = `http://192.168.1.108:8080/secure/currentUser`;
-
-    const fetchUser = async () => {
-      try {
-        const response = await axios.get(url, { withCredentials: true });
-        var cyclicGraph = await response.data;
-        var jsogStructure = JSOG.encode(cyclicGraph);
-        cyclicGraph = JSOG.decode(jsogStructure);
-        setUser(cyclicGraph);
-        setLoadedUser(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    if (auth) fetchUser();
-  }, []);
+
+  const [postForModal, setPostForModal] = useState(null);
 
   const handleLike = async (post) => {
+    if (
+      auth &&
+      userLoaded &&
+      !post.likes.some((e) => e.id === user.user.id) &&
+      !post.dislikes.some((e) => e.id === user.user.id)
+    ) {
+      const response = await axios(
+        `http://192.168.0.17:8080/secure/professor/${professor.professorId}/upvoteOpinion/${post.postId}`,
+        {
+          method: "get",
+          withCredentials: true,
+        }
+      );
+
+      window.location.reload(false);
+    } else {
+      return;
+    }
+  };
+
+  const handleDislike = async (post) => {
+    if (
+      auth &&
+      auth &&
+      userLoaded &&
+      !post.likes.some((e) => e.id === user.user.id) &&
+      !post.dislikes.some((e) => e.id === user.user.id)
+    ) {
+      const response = await axios(
+        `http://192.168.0.17:8080/secure/professor/${professor.professorId}/downvoteOpinion/${post.postId}`,
+        {
+          method: "get",
+          withCredentials: true,
+        }
+      );
+
+      window.location.reload(false);
+    } else {
+      return;
+    }
+  };
+
+  const handleReply = (opinion) => {
     if (auth) {
-      if (
-        loadedUser &&
-        user &&
-        !post.votes.some((e) => e.user.id === user.id)
-      ) {
-        const response = await axios(
-          `http://192.168.1.108:8080/secure/upvoteOpinion/${post.postId}`,
-          {
-            method: "get",
-            withCredentials: true,
-          }
-        );
-        window.location.reload();
-      } else {
-        return;
-      }
+      setReplyModalDisplay("block");
+      setPostForModal(opinion);
     } else {
       navigate("/login");
@@ -87,60 +90,10 @@
   };
 
-  const handleDislike = async (post) => {
-    if (auth) {
-      if (
-        loadedUser &&
-        user &&
-        !post.votes.some((e) => e.user.id === user.id)
-      ) {
-        const response = await axios(
-          `http://192.168.1.108:8080/secure/downvoteOpinion/${post.postId}`,
-          {
-            method: "get",
-            withCredentials: true,
-          }
-        );
-
-        window.location.reload();
-      } else {
-        return;
-      }
-    } else {
-      navigate("/login");
-    }
-  };
-
-  const handleReply = (opinion) => {
-    if (auth) {
-      setReplyModalDisplay("block");
-      setPostForReplyModal(opinion);
-      document.body.style.overflowY = "hidden";
-    } else {
-      navigate("/login");
-    }
-  };
-
-  const handleReport = (opinion) => {
-    if (auth) {
-      setReportModalDisplay("block");
-      setPostForReportModal(opinion);
-      document.body.style.overflowY = "hidden";
-    } else {
-      navigate("/login");
-    }
-  }
-
   const handleModalCloseClick = () => {
     setReplyModalDisplay("none");
-    setReportModalDisplay("none");
-    document.body.style.overflowY = "auto";
-  };
-
-  const handleReplyContentChange = (e) => {
+  };
+
+  const handleContentChange = (e) => {
     setReplyContent(e.target.value);
-  };
-
-  const handleReportContentChange = (e) => {
-    setReportContent(e.target.value);
   };
 
@@ -148,132 +101,68 @@
     e.preventDefault();
 
-    if (!replyContent.length < 1) {
-      const response = await axios(
-        `http://192.168.1.108:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`,
-        {
-          method: "post",
-          data: {
-            content: replyContent,
-          },
-          withCredentials: true,
-        }
-      );
-      setErrorMessage("");
-      window.location.reload();
-    } else {
-      setErrorMessage("Полето за содржина не смее да биде празно");
-    }
-  };
-
-  const handleReportSubmit = async (e, postId) => {
-    e.preventDefault();
-
-    if (!reportContent.length < 1) {
-      const response = await axios(
-          `http://192.168.1.108:8080/secure/reportOpinion/${postId}`,
-          {
-            method: "post",
-            data: {
-              description: reportContent,
-            },
-            withCredentials: true,
-          }
-      );
-      setErrorMessage("");
-      window.location.reload();
-    } else {
-      setErrorMessage("Полето за содржина не смее да биде празно");
-    }
+    const response = await axios(
+      `http://192.168.0.17:8080/secure/professor/${professor.professorId}/replyToOpinion/${postId}`,
+      {
+        method: "post",
+        data: {
+          content: replyContent,
+        },
+        withCredentials: true,
+      }
+    );
+
+    window.location.reload(false);
+    //console.log(response);
   };
 
   function displayChildPosts(child, parentPostAuthorUsername, replyIndent) {
     if (child == null) return;
-    if (!renderedOpinionIds.includes(child.postId)) {postCount = renderedOpinionIds.push(child.postId);}
+    postCount = renderedOpinionIds.push(child.postId);
     return (
       <div key={child.postId}>
         <OpinionReplyCard indent={replyIndent + "px"}>
           <OpinionReplyCardContent>
-            <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-              <a href={"/user/" + child.author.id}>{child.author.username}</a>{" "}
-              му реплицирал на {parentPostAuthorUsername}
+            <p>
+              <a href="#">{child.author.username}</a> му реплицирал на{" "}
+              {parentPostAuthorUsername}
             </p>
-            <p style={{ marginBottom: "10px", maxWidth: "85%" }}>
-              {child.content}
-            </p>
-            {new Date(child.timePosted).setMilliseconds(0) === new Date(child.timeLastEdited).setMilliseconds(0) ? (
-              <OpinionCardContentTime>
-                {dateConverter(
-                  new Date(child.timePosted).toString().slice(4, -43)
-                )} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>
-              </OpinionCardContentTime>
-            ) : (
-              <OpinionCardContentTime>
-                {dateConverter(
-                  new Date(child.timeLastEdited).toString().slice(4, -43)
-                )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>{" "}
-                (едитирано од модератор)
-              </OpinionCardContentTime>
-            )}
-
-            <div
-              style={{
-                display:
-                  !auth || (auth && loadedUser && user.id !== child.author.id)
-                    ? "block"
-                    : "none",
-              }}
-            >
-              <StyledFontAwesomeIcon
-                icon={solid("thumbs-up")}
-                right={50 + "px"}
-                color={
-                  auth && loadedUser && user
-                    ? child.votes.some(
-                        (e) => e.vote === "UPVOTE" && e.user.id === user.id
-                      )
-                      ? "green"
+            <p>{child.content}</p>
+            <OpinionReplyCardContentTime>
+              {dateConverter(
+                new Date(child.timePosted).toString().slice(4, -43)
+              )}
+            </OpinionReplyCardContentTime>
+            {auth && userLoaded && user.user.id !== child.author.id && (
+              <>
+                <StyledFontAwesomeIcon
+                  icon={solid("thumbs-up")}
+                  right={50 + "px"}
+                  color={
+                    child.likes.some((e) => e.id === user.user.id)
+                      ? "greenyellow"
                       : "darkgrey"
-                    : "darkgrey"
-                }
-                onClick={() => handleLike(child)}
-              />
-
-              <VoteCount right={50 + "px"}>
-                {child.votes.filter((v) => v.vote === "UPVOTE").length}
-              </VoteCount>
-
-              <StyledFontAwesomeIcon
-                icon={solid("thumbs-down")}
-                right={10 + "px"}
-                color={
-                  auth && loadedUser && user
-                    ? child.votes.some(
-                        (e) => e.vote === "DOWNVOTE" && e.user.id === user.id
-                      )
+                  }
+                  onClick={() => handleLike(child)}
+                />
+                <VoteCount right={50 + "px"}>{child.likes.length}</VoteCount>
+                <StyledFontAwesomeIcon
+                  icon={solid("thumbs-down")}
+                  right={10 + "px"}
+                  color={
+                    child.dislikes.some((e) => e.id === user.user.id)
                       ? "indianred"
                       : "darkgrey"
-                    : "darkgrey"
-                }
-                onClick={() => handleDislike(child)}
-              />
-
-              <VoteCount right={10 + "px"}>
-                {child.votes.filter((v) => v.vote === "DOWNVOTE").length}
-              </VoteCount>
-
-              <StyledFontAwesomeIcon
-                icon={solid("reply")}
-                right={90 + "px"}
-                color="darkgrey"
-                onClick={() => handleReply(child)}
-              />
-
-              <StyledFontAwesomeIcon
-                  icon={solid("flag")}
-                  right={130 + "px"}
+                  }
+                  onClick={() => handleDislike(child)}
+                />
+                <VoteCount right={10 + "px"}>{child.dislikes.length}</VoteCount>
+                <StyledFontAwesomeIcon
+                  icon={solid("reply")}
+                  right={90 + "px"}
                   color="darkgrey"
-                  onClick={() => handleReport(child)}
-              />
-            </div>
+                  onClick={() => handleReply(child)}
+                />
+              </>
+            )}
           </OpinionReplyCardContent>
           {child.children.map((childOfChild) =>
@@ -291,6 +180,6 @@
   return (
     <div className="opinionTree">
-      {relatedOpinions.map((opinion) => {
-        if (!renderedOpinionIds.includes(opinion.postId) && opinion.parent === null) {
+      {professor.relatedOpinions.map((opinion) => {
+        if (!renderedOpinionIds.includes(opinion.postId)) {
           postCount = renderedOpinionIds.push(opinion.postId);
           return (
@@ -298,96 +187,52 @@
               <OpinionCard>
                 <OpinionCardContent>
-                  <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-                    <a href={"/user/" + opinion.author.id}>
-                      {opinion.author.username}
-                    </a>{" "}
-                    напишал
+                  <p>
+                    <a href="#">{opinion.author.username}</a> напишал
                   </p>
-                  <p style={{ marginBottom: "10px", maxWidth: "85%" }}>
-                    {opinion.content}
-                  </p>
-                  {new Date(opinion.timePosted).setMilliseconds(0) === new Date(opinion.timeLastEdited).setMilliseconds(0) ? (
-                    <OpinionCardContentTime>
-                      {dateConverter(
-                        new Date(opinion.timePosted).toString().slice(4, -43)
-                      )} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>
-                    </OpinionCardContentTime>
-                  ) : (
-                    <OpinionCardContentTime>
-                      {dateConverter(
-                        new Date(opinion.timeLastEdited)
-                          .toString()
-                          .slice(4, -43)
-                      )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>{" "}
-                      (едитирано од модератор)
-                    </OpinionCardContentTime>
-                  )}
-
-                  <div
-                    style={{
-                      display:
-                        !auth ||
-                        (auth && loadedUser && user.id !== opinion.author.id)
-                          ? "block"
-                          : "none",
-                    }}
-                  >
-                    <StyledFontAwesomeIcon
-                      icon={solid("thumbs-up")}
-                      right={50 + "px"}
-                      color={
-                        auth && loadedUser && user
-                          ? opinion.votes.some(
-                              (e) =>
-                                e.vote === "UPVOTE" && e.user.id === user.id
-                            )
-                            ? "green"
+                  <OpinionCardContentTitle>
+                    {opinion.title}
+                  </OpinionCardContentTitle>
+                  <p>{opinion.content}</p>
+                  <OpinionCardContentTime>
+                    {dateConverter(
+                      new Date(opinion.timePosted).toString().slice(4, -43)
+                    )}
+                  </OpinionCardContentTime>
+                  {auth && userLoaded && user.user.id !== opinion.author.id && (
+                    <>
+                      <StyledFontAwesomeIcon
+                        icon={solid("thumbs-up")}
+                        right={50 + "px"}
+                        color={
+                          opinion.likes.some((e) => e.id === user.user.id)
+                            ? "greenyellow"
                             : "darkgrey"
-                          : "darkgrey"
-                      }
-                      onClick={() => handleLike(opinion)}
-                    />
-
-                    <VoteCount right={50 + "px"}>
-                      {opinion.votes.filter((v) => v.vote === "UPVOTE").length}
-                    </VoteCount>
-
-                    <StyledFontAwesomeIcon
-                      icon={solid("thumbs-down")}
-                      right={10 + "px"}
-                      color={
-                        auth && loadedUser && user
-                          ? opinion.votes.some(
-                              (e) =>
-                                e.vote === "DOWNVOTE" && e.user.id === user.id
-                            )
+                        }
+                        onClick={() => handleLike(opinion)}
+                      />
+                      <VoteCount right={50 + "px"}>
+                        {opinion.likes.length}
+                      </VoteCount>
+                      <StyledFontAwesomeIcon
+                        icon={solid("thumbs-down")}
+                        right={10 + "px"}
+                        color={
+                          opinion.dislikes.some((e) => e.id === user.user.id)
                             ? "indianred"
                             : "darkgrey"
-                          : "darkgrey"
-                      }
-                      onClick={() => handleDislike(opinion)}
-                    />
-
-                    <VoteCount right={10 + "px"}>
-                      {
-                        opinion.votes.filter((v) => v.vote === "DOWNVOTE")
-                          .length
-                      }
-                    </VoteCount>
-
-                    <StyledFontAwesomeIcon
-                      icon={solid("reply")}
-                      right={90 + "px"}
-                      color="darkgrey"
-                      onClick={() => handleReply(opinion)}
-                    />
-
-                    <StyledFontAwesomeIcon
-                        icon={solid("flag")}
-                        right={130 + "px"}
+                        }
+                        onClick={() => handleDislike(opinion)}
+                      />
+                      <VoteCount right={10 + "px"}>
+                        {opinion.dislikes.length}
+                      </VoteCount>
+                      <StyledFontAwesomeIcon
+                        icon={solid("reply")}
+                        right={90 + "px"}
                         color="darkgrey"
-                        onClick={() => handleReport(opinion)}
-                    />
-                  </div>
+                        onClick={() => handleReply(opinion)}
+                      />
+                    </>
+                  )}
                 </OpinionCardContent>
                 {opinion.children.map((child) =>
@@ -398,7 +243,6 @@
           );
         }
-        return null;
       })}
-      {postForReplyModal && (
+      {postForModal && (
         <Modal display={replyModalDisplay}>
           <ModalContent>
@@ -406,8 +250,8 @@
               <ModalClose onClick={handleModalCloseClick}>&times;</ModalClose>
               <h3 style={{ marginTop: "5px" }}>
-                Реплика на {postForReplyModal.author.username}
+                Реплика на {postForModal.author.username}
               </h3>
             </ModalHeader>
-            <form onSubmit={(e) => handleReplySubmit(e, postForReplyModal.postId)}>
+            <form onSubmit={(e) => handleReplySubmit(e, postForModal.postId)}>
               <ModalBody>
                 <label htmlFor="content">
@@ -418,14 +262,8 @@
                     cols="100"
                     value={replyContent}
-                    onChange={handleReplyContentChange}
-                    spellCheck={false}
+                    onChange={handleContentChange}
                   />
                 </label>
               </ModalBody>
-              <p
-                style={{ color: "red", marginLeft: "15px", marginTop: "10px" }}
-              >
-                {errorMessage}
-              </p>
               <ModalFooter type="submit">РЕПЛИЦИРАЈ</ModalFooter>
             </form>
@@ -433,37 +271,4 @@
         </Modal>
       )}
-      {postForReportModal && (
-          <Modal display={reportModalDisplay}>
-            <ModalContent>
-              <ModalHeader>
-                <ModalClose onClick={handleModalCloseClick}>&times;</ModalClose>
-                <h3 style={{ marginTop: "5px" }}>
-                  Пријава за мислење #{postForReportModal.postId}
-                </h3>
-              </ModalHeader>
-              <form onSubmit={(e) => handleReportSubmit(e, postForReportModal.postId)}>
-                <ModalBody>
-                  <label htmlFor="content">
-                    <b>Наведете причина</b>:
-                    <ModalTextarea
-                        id="content"
-                        rows="8"
-                        cols="100"
-                        value={reportContent}
-                        onChange={handleReportContentChange}
-                        spellCheck={false}
-                    />
-                  </label>
-                </ModalBody>
-                <p
-                    style={{ color: "red", marginLeft: "15px", marginTop: "10px" }}
-                >
-                  {errorMessage}
-                </p>
-                <ModalFooter type="submit">ПРИЈАВИ</ModalFooter>
-              </form>
-            </ModalContent>
-          </Modal>
-      )}
     </div>
   );
Index: reactapp/src/Components/Root.js
===================================================================
--- reactapp/src/Components/Root.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,38 +1,0 @@
-import React, { useContext, useEffect, useState } from "react";
-import { MainWrapper, MainTitle } from "./Styled/Main.style";
-import { Outlet } from "react-router-dom";
-import Search from "./Search";
-import UserHeader from "./UserHeader";
-import AuthApi from "../api/AuthApi";
-import Logout from "./Logout";
-import {LogoutButton} from "./Styled/UserDetails.style";
-
-function Root({ user, userLoaded }) {
-  const { auth, setAuth } = useContext(AuthApi);
-
-  return (
-    <MainWrapper>
-      <style>
-        @import
-        url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
-      </style>
-      <style>
-        {
-          "body { background-color: papayawhip;} * {margin: 0; padding: 0; box-sizing: border-box;}"
-        }
-      </style>
-      <a href="/">
-        <MainTitle>profesori.mk</MainTitle>
-      </a>{" "}
-        <div style={{ float: "left", marginTop: 20, marginLeft: 40 }}>
-            {!auth && <a href="/login"><LogoutButton style={{textDecoration:"underline", color:"black"}}>Најава/регистрација</LogoutButton></a>}{" "}
-        </div>
-      <Search />
-      {auth && <UserHeader />}
-      <div style={{ marginTop: "140px" }}/>
-      <Outlet />
-    </MainWrapper>
-  );
-}
-
-export default Root;
Index: reactapp/src/Components/Search.js
===================================================================
--- reactapp/src/Components/Search.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/Search.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -13,23 +13,17 @@
   const [query, setQuery] = useState("");
   const [professors, setProfessors] = useState([]);
-  const [subjects, setSubjects] = useState([]);
 
   useEffect(() => {
+    const url = `http://192.168.0.17:8080/public/professors/nameContains/${transliterate(
+      query
+    )}`;
+
     const fetchData = async () => {
       try {
-        Promise.all([fetch(`http://192.168.1.108:8080/public/professors/nameContains/${transliterate(query)}`),
-          fetch(`http://192.168.1.108:8080/public/subjects/nameContains/${transliterate(query)}`)])
-            .then(([resProfessors, resSubjects]) => Promise.all([resProfessors.json(), resSubjects.json()]))
-            .then(([dataProfessors, dataSubjects]) => {
-              let cyclicGraph1 = dataProfessors;
-              let jsogStructure1 = JSOG.encode(cyclicGraph1);
-              cyclicGraph1 = JSOG.decode(jsogStructure1);
-              setProfessors(cyclicGraph1);
-
-              let cyclicGraph2 = dataSubjects;
-              let jsogStructure2 = JSOG.encode(cyclicGraph2);
-              cyclicGraph2 = JSOG.decode(jsogStructure2);
-              setSubjects(cyclicGraph2);
-            })
+        const response = await fetch(url);
+        var cyclicGraph = await response.json();
+        var jsogStructure = JSOG.encode(cyclicGraph);
+        cyclicGraph = JSOG.decode(jsogStructure);
+        setProfessors(cyclicGraph);
       } catch (error) {
         console.log("Fetching error", error);
@@ -37,5 +31,5 @@
     };
 
-    if (query.length > 3) fetchData();
+    if (query.length > 2) fetchData();
   }, [query]);
 
@@ -45,5 +39,5 @@
     if (event.key === "Enter") {
       setExpanded(false);
-      navigate("/search", { state: professors.concat(subjects) });
+      navigate("/search", { state: professors });
     }
   };
@@ -77,13 +71,13 @@
       <SearchDropdown
         display={
-          query.length > 3 && (professors.length > 0 || subjects.length > 0) && expanded
+          query.length > 2 && professors.length > 0 && expanded
             ? "block"
             : "none"
         }
       >
-        {query.length > 3 &&
-          professors.concat(subjects).slice(0, 7).map((match) => (
+        {query.length > 2 &&
+          professors.slice(0, 7).map((professor) => (
             <SearchResult
-              key={match.professorId !== undefined ? match.professorId : match.subjectId}
+              key={professor.professorId}
               onMouseDown={(event) => {
                 event.preventDefault();
@@ -92,10 +86,10 @@
               margin="0"
             >
-              <SearchResultLink href={`/${match.professorId !== undefined ? 'professor': 'subject'}/` + `${match.professorId !== undefined ? match.professorId : match.subjectId}`}>
+              <SearchResultLink href={"/professor/" + professor.professorId}>
                 <SearchResultText weight="bold" size="medium">
-                  {match.professorId !== undefined ? match.professorName : match.subjectName}
+                  {professor.professorName}
                 </SearchResultText>
                 <SearchResultText weight="normal" size="er">
-                  {match.professorId !== undefined ? match.faculty.facultyName : match.studyProgramme.faculty.facultyName}
+                  {professor.faculty.facultyName}
                 </SearchResultText>
               </SearchResultLink>
Index: reactapp/src/Components/Styled/EntityList.style.js
===================================================================
--- reactapp/src/Components/Styled/EntityList.style.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,48 +1,0 @@
-import styled from "styled-components";
-
-export const EntityUl = styled.ul`
-  list-style: none;
-  padding-left: 5px;
-`;
-
-export const EntityLi = styled.li`
-  padding: 10px;
-  margin: 15px 0px;
-  font-size: 18px;
-  font-weight: bold;
-  background-color: ${(props) => props.bgcolor};
-  box-shadow: 2px 2px 5px #aaaaaa;
-  position: relative;
-`;
-
-export const EntityParam = styled.p`
-  position: absolute;
-  right: ${(props) => props.right};
-  top: 10px;
-  font-style: italic;
-  font-size: 16px;
-`;
-
-export const EntityTypeSelector = styled.div`
-  box-shadow: ${(props) => props.boxshadow};
-  width: 50%;
-  height: 50px;
-  opacity: 0.6;
-  margin: 15px 10px;
-  margin-bottom: 30px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 20px;
-  font-weight: bold;
-  background-color: ${(props) => props.backgroundcolor};
-  color: ${(props) => props.color};
-  letter-spacing: 2px;
-  transition: 0.4s;
-  &:hover {
-    box-shadow: ${(props) => props.boxshadowhover};
-    font-weight: bold;
-    cursor: ${(props) => props.cursor};
-    opacity: ${(props) => props.opacityhover};
-  }
-`;
Index: reactapp/src/Components/Styled/LoadingSpinner.style.js
===================================================================
--- reactapp/src/Components/Styled/LoadingSpinner.style.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,11 +1,0 @@
-import React from "react";
-import "../../static/spinner.css";
-
-export default function LoadingSpinner() {
-    return (
-        <div className="spinner-container">
-            <div className="loading-spinner">
-            </div>
-        </div>
-    );
-}
Index: reactapp/src/Components/Styled/Login.style.js
===================================================================
--- reactapp/src/Components/Styled/Login.style.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,49 +1,0 @@
-import styled from "styled-components";
-
-export const LoginInput = styled.input`
-  height: 30px;
-  width: 100%;
-  margin: 15px;
-  padding: 15px;
-  font-size: 16px;
-  border: 2px solid #ccc;
-`;
-
-export const LoginButton = styled.button`
-  background-color: rgba(0, 102, 204, 1);
-  opacity: 0.6;
-  padding: 5px 16px;
-  transition: 0.4s;
-  &:hover {
-    opacity: 1;
-    cursor: pointer;
-  }
-  color: white;
-  border: 0;
-  font-size: 18px;
-  font-weight: bold;
-  margin-top: 10px;
-  width: 100%;
-`;
-
-export const RequiredAsterisk = styled.p`
-  color: rgba(0, 102, 204, 1);
-  font-weight: bold;
-  position: absolute;
-  right: 38px;
-  top: ${(props) => props.top};
-  font-size: 18px;
-`;
-
-export const FieldConstraintModal = styled.div`
-  width: 400px;
-  padding: 15px;
-  color: white;
-  background-color: rgba(0, 0, 0, 0.6);
-  display: block;
-  transition: opacity 0.4s ease-out;
-  opacity: ${(props) => props.opacity};
-  position: absolute;
-  right: ${(props) => props.right};
-  top: ${(props) => props.top};
-`;
Index: reactapp/src/Components/Styled/Main.style.js
===================================================================
--- reactapp/src/Components/Styled/Main.style.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/Styled/Main.style.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -12,5 +12,4 @@
   padding-bottom: 30px;
   width: 80%;
-  box-shadow: 2px 2px 10px #aaaaaa;
 `;
 
@@ -22,8 +21,2 @@
   color: black;
 `;
-
-export const CurrentPageNav = styled.div`
-  font-style: italic;
-  font-size: 16px;
-  font-weight: bold;
-`;
Index: reactapp/src/Components/Styled/Modal.style.js
===================================================================
--- reactapp/src/Components/Styled/Modal.style.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/Styled/Modal.style.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -18,5 +18,4 @@
   float: right;
   font-weight: bold;
-  box-shadow: 2px 1px 10px #aaaaaa;
 `;
 
@@ -28,5 +27,5 @@
   top: 0;
   width: 100%;
-  height: 100%;
+  height: auto;
   overflow: auto;
   background-color: rgb(0, 0, 0);
@@ -47,5 +46,5 @@
 export const ModalContent = styled.div`
   background-color: #fefefe;
-  margin: 2% auto;
+  margin: 15% auto;
   padding: 20px;
   border: 1px solid #888;
@@ -107,5 +106,4 @@
   padding: 12px 16px;
   border: 1px solid #ccc;
-  font-family: inherit;
 `;
 
@@ -117,4 +115,3 @@
   border: 1px solid #ccc;
   resize: none;
-  font-family: inherit;
 `;
Index: reactapp/src/Components/Styled/OpinionCard.style.js
===================================================================
--- reactapp/src/Components/Styled/OpinionCard.style.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/Styled/OpinionCard.style.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -8,5 +8,5 @@
   margin-bottom: 20px;
   padding: 10px;
-  box-shadow: 2px 2px 10px #aaaaaa;
+  border: 1px solid black;
 `;
 
@@ -18,5 +18,4 @@
   }
   position: relative;
-  overflow-wrap: break-word;
 `;
 
@@ -56,5 +55,4 @@
   display: block;
   position: absolute;
-  height: 20px;
   top: 50%;
   transform: translateY(-50%);
@@ -62,5 +60,5 @@
   transition: 0.5s;
   &:hover {
-    opacity: 0.5;
+    color: ${(props) => props.color};
     cursor: pointer;
   }
Index: reactapp/src/Components/Styled/ProfessorCard.style.js
===================================================================
--- reactapp/src/Components/Styled/ProfessorCard.style.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/Styled/ProfessorCard.style.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -2,8 +2,9 @@
 
 export const ProfessorCard = styled.div`
+  background-color: papayawhip;
   width: auto;
   padding: 10px;
   margin-bottom: 30px;
-  margin-top: 40px;
+  margin-top: 140px;
 `;
 
Index: reactapp/src/Components/Styled/SubjectsAccordion.style..js
===================================================================
--- reactapp/src/Components/Styled/SubjectsAccordion.style..js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,27 +1,0 @@
-import styled from "styled-components";
-
-export const SubjectsAccordionDiv = styled.div`
-  height: ${(props) => props.height};
-  opacity: ${(props) => props.opacity};
-  transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
-  margin-left: 20px;
-`;
-
-export const AccordionTitle = styled.div`
-  padding: 10px;
-  margin: 15px 0px;
-  font-size: 18px;
-  font-weight: bold;
-  background-color: cornsilk;
-  box-shadow: 2px 2px 5px #aaaaaa;
-  position: relative;
-  cursor: pointer;
-`;
-
-export const OpenAccordionSymbol = styled.span`
-  font-size: 24px;
-  position: absolute;
-  right: 15px;
-  bottom: 7px;
-  color: grey;
-`;
Index: reactapp/src/Components/SubjectsAccordion.js
===================================================================
--- reactapp/src/Components/SubjectsAccordion.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,117 +1,0 @@
-import React, { useState } from "react";
-import {
-  AccordionTitle,
-  SubjectsAccordionDiv,
-  OpenAccordionSymbol,
-} from "./Styled/SubjectsAccordion.style.";
-import { EntityLi, EntityUl, EntityParam } from "./Styled/EntityList.style";
-import JSOG from "jsog";
-
-const SubjectsAccordion = (props) => {
-  const [height, setHeight] = useState("0");
-  const [opacity, setOpacity] = useState(0);
-
-  const [subjects, setSubjects] = useState(null);
-  const [loadedSubjects, setLoadedSubjects] = useState(false);
-  const [counts, setCounts] = useState(null);
-  const [loadedCounts, setLoadedCounts] = useState(false);
-
-  const [fetchError, setFetchError] = useState(false);
-  const handleClick = () => {
-    if (height === "0") {
-      setHeight("auto");
-      setOpacity(1);
-      try {
-        Promise.all([fetch(`http://192.168.1.108:8080/public/subjects?studyProgrammeId=${props.title.studyProgrammeId}`),
-          fetch(`http://192.168.1.108:8080/public/study_programme/${props.title.studyProgrammeId}/threadCountForEachSubject`)])
-            .then(([resSubjects, counts]) => Promise.all([resSubjects.json(), counts.json()]))
-            .then(([dataSubjects, dataCounts]) => {
-              let cyclicGraph1 = dataSubjects;
-              let jsogStructure1 = JSOG.encode(cyclicGraph1);
-              cyclicGraph1 = JSOG.decode(jsogStructure1);
-              setSubjects(cyclicGraph1);
-              setLoadedSubjects(true);
-
-              let cyclicGraph2 = dataCounts;
-              let jsogStructure2 = JSOG.encode(cyclicGraph2);
-              cyclicGraph2 = JSOG.decode(jsogStructure2);
-              setCounts(cyclicGraph2);
-              setLoadedCounts(true);
-            })
-
-      } catch (error) {
-        setFetchError(true);
-      }
-    } else {
-      setHeight("0");
-      setOpacity(0);
-    }
-  };
-  return (
-    <div onClick={() => handleClick()}>
-      <AccordionTitle>
-        {props.title.studyProgrammeName} ({props.title.cycle}. циклус)
-        <OpenAccordionSymbol>&#9662;</OpenAccordionSymbol>
-      </AccordionTitle>
-      <SubjectsAccordionDiv height={height} opacity={opacity}>
-        <EntityUl>
-          {loadedSubjects &&
-            subjects.map((item, idx) => {
-              let totalPosts = parseInt(counts[idx].split(",")[1]);
-              return (
-                <EntityLi key={item.subjectName} bgcolor="cornsilk">
-                  <a href={"/subject/" + item.subjectId}>{item.subjectName}</a>
-                  <EntityParam right="30px">
-                    {totalPosts !== 1 ? (
-                      totalPosts !== 0 ? (
-                        <span
-                          style={{
-                            fontWeight: "normal",
-                            opacity: totalPosts === 0 ? "0.5" : "1",
-                          }}
-                        >
-                          <span
-                            style={{
-                              fontWeight: "bold",
-                              opacity: totalPosts === 0 ? "0.5" : "1",
-                            }}
-                          >
-                            {totalPosts}
-                          </span>{" "}
-                          мислења
-                        </span>
-                      ) : (
-                        <span
-                          style={{
-                            fontWeight: "normal",
-                            opacity: totalPosts === 0 ? "0.5" : "1",
-                          }}
-                        >
-                          <span
-                            style={{
-                              fontWeight: "bold",
-                              opacity: totalPosts === 0 ? "0.5" : "1",
-                            }}
-                          >
-                            {totalPosts}
-                          </span>{" "}
-                          мислења
-                        </span>
-                      )
-                    ) : (
-                      <span style={{ fontWeight: "normal" }}>
-                        <span style={{ fontWeight: "bold" }}>{totalPosts}</span>{" "}
-                        мислење
-                      </span>
-                    )}
-                  </EntityParam>
-                </EntityLi>
-              );
-            })}
-        </EntityUl>
-      </SubjectsAccordionDiv>
-    </div>
-  );
-};
-
-export default SubjectsAccordion;
Index: reactapp/src/Components/UserHeader.js
===================================================================
--- reactapp/src/Components/UserHeader.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Components/UserHeader.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -3,37 +3,13 @@
 import axios from "../api/axios";
 import Logout from "./Logout";
-import LoadingSpinner from "./Styled/LoadingSpinner.style";
 
-function UserHeader({}) {
-  const [user, setUser] = useState(null);
-  const [loadedUser, setLoadedUser] = useState(false);
-  const [fetchError, setFetchError] = useState(false);
-
-  useEffect(() => {
-    const url = `http://192.168.1.108:8080/secure/currentUser`;
-
-    const fetchUser = async () => {
-      try {
-        const response = await axios.get(url, { withCredentials: true });
-        var cyclicGraph = await response.data;
-        var jsogStructure = JSOG.encode(cyclicGraph);
-        cyclicGraph = JSOG.decode(jsogStructure);
-        setUser(cyclicGraph);
-        setLoadedUser(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    fetchUser();
-  }, []);
-
-  return loadedUser ? (
-    <div style={{ float: "left", marginTop: 20, marginLeft: 10 }}>
+function UserHeader({ user, userLoaded }) {
+  return userLoaded ? (
+    <div style={{ float: "left", marginTop: 20, marginLeft: 40 }}>
       Најавен/а: <a href="/user_dashboard">{user.username}</a> <Logout />{" "}
     </div>
   ) : (
-    <div style={{ float: "left", marginTop: 25, marginLeft: 10 }}>
-      <LoadingSpinner/>
+    <div style={{ float: "left", marginTop: 25, marginLeft: 60 }}>
+      се вчитува...
     </div>
   );
Index: reactapp/src/Pages/Faculty.js
===================================================================
--- reactapp/src/Pages/Faculty.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,250 +1,0 @@
-import React, { useState, useEffect } from "react";
-import { useParams, Outlet } from "react-router-dom";
-import JSOG from "jsog";
-import {
-  ProfessorCard,
-  ProfessorCardName,
-  ProfessorCardSeparator,
-  ProfessorCardDetails,
-} from "../Components/Styled/ProfessorCard.style";
-import {
-  EntityUl,
-  EntityLi,
-  EntityParam,
-  EntityTypeSelector,
-} from "../Components/Styled/EntityList.style";
-import SubjectsAccordion from "../Components/SubjectsAccordion";
-import { CurrentPageNav } from "../Components/Styled/Main.style";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
-
-const Faculty = () => {
-  let params = useParams();
-
-  const [professors, setProfessors] = useState(null);
-  const [studyProgrammes, setStudyProgrammes] = useState(null);
-  const [professorOpinionCount, setProfessorOpinionCount] = useState(null);
-  const [loadedProfessors, setLoadedProfessors] = useState(false);
-  const [loadedStudyProgrammes, setLoadedStudyProgrammes] = useState(false);
-  const [loadedProfessorOpinionCount, setLoadedProfessorOpinionCount] = useState(false);
-
-  const [fetchError, setFetchError] = useState(false);
-  const [entityType, setEntityType] = useState(0);
-
-  useEffect(() => {
-    const fetchProfessors = async () => {
-      try {
-        const response = await fetch(`http://192.168.1.108:8080/public/professors?facultyId=${params.facultyId}`);
-        let cyclicGraph = await response.json();
-        let jsogStructure = JSOG.encode(cyclicGraph);
-        cyclicGraph = JSOG.decode(jsogStructure);
-        setProfessors(cyclicGraph);
-        setLoadedProfessors(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    const fetchStudyProgrammes = async () => {
-      try {
-        const response2 = await fetch(`http://192.168.1.108:8080/public/study_programmes?facultyId=${params.facultyId}`);
-        let cyclicGraph2 = await response2.json();
-        let jsogStructure2 = JSOG.encode(cyclicGraph2);
-        cyclicGraph2 = JSOG.decode(jsogStructure2);
-        setStudyProgrammes(cyclicGraph2);
-        setLoadedStudyProgrammes(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    const fetchProfessorOpinionCount = async () => {
-      try {
-        const response3 = await fetch(`http://192.168.1.108:8080/public/faculty/${params.facultyId}/opinionCountForEachProfessor`);
-        let cyclicGraph3 = await response3.json();
-        let jsogStructure3 = JSOG.encode(cyclicGraph3);
-        cyclicGraph3 = JSOG.decode(jsogStructure3);
-        setProfessorOpinionCount(cyclicGraph3);
-        setLoadedProfessorOpinionCount(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    }
-
-    fetchProfessors();
-    fetchStudyProgrammes();
-    fetchProfessorOpinionCount();
-  }, [params.facultyId]);
-
-  return loadedProfessors && professors.length !== 0 ? (
-    entityType === 0 ? (
-      <>
-        <CurrentPageNav>
-          &#187;{" "}
-          <a
-            href={
-              "/university/" + professors[0].faculty.university.universityId
-            }
-          >
-            {professors[0].faculty.university.universityName}
-          </a>{" "}
-          &#187; <a href="#">{professors[0].faculty.facultyName}</a>
-        </CurrentPageNav>
-        <ProfessorCard>
-          <ProfessorCardName>
-            {professors[0].faculty.facultyName}
-          </ProfessorCardName>
-          <ProfessorCardSeparator />
-          <ProfessorCardDetails fontSize="20px">
-            {professors[0].faculty.university.universityName}
-          </ProfessorCardDetails>
-        </ProfessorCard>
-        <div style={{ display: "flex" }}>
-          <EntityTypeSelector
-            backgroundcolor="rgba(0, 102, 204, 1)"
-            color="white"
-            boxshadow="none"
-            boxshadowhover="none"
-            opacityhover="0.6"
-            cursor="auto"
-          >
-            Прикажи професори
-          </EntityTypeSelector>
-          <EntityTypeSelector
-            boxshadow="2px 2px 5px #aaaaaa"
-            cursor="pointer"
-            boxshadowhover="2px 2px 10px #aaaaaa"
-            opacityhover="1"
-            onClick={() => setEntityType(1)}
-          >
-            Прикажи предмети
-          </EntityTypeSelector>
-        </div>
-        <div key={params.facultyId}>
-          {professors.map((professor, idx) => {
-            let totalPosts = loadedProfessorOpinionCount ? parseInt(professorOpinionCount[idx].split(",")[1]) : 0;
-            return (
-              <EntityUl key={professor.professorId}>
-                <EntityLi bgcolor="cornsilk">
-                  <a href={"/professor/" + professor.professorId}>
-                    {professor.professorName}
-                  </a>
-                  <EntityParam right="30px">
-                    {totalPosts !== 1 ? (
-                      totalPosts !== 0 ? (
-                        <span
-                          style={{
-                            fontWeight: "normal",
-                            opacity: totalPosts === 0 ? "0.5" : "1",
-                          }}
-                        >
-                          <span
-                            style={{
-                              fontWeight: "bold",
-                              opacity: totalPosts === 0 ? "0.5" : "1",
-                            }}
-                          >
-                            {totalPosts}
-                          </span>{" "}
-                          мислења
-                        </span>
-                      ) : (
-                        <span
-                          style={{
-                            fontWeight: "normal",
-                            opacity: totalPosts === 0 ? "0.5" : "1",
-                          }}
-                        >
-                          <span
-                            style={{
-                              fontWeight: "bold",
-                              opacity: totalPosts === 0 ? "0.5" : "1",
-                            }}
-                          >
-                            {totalPosts}
-                          </span>{" "}
-                          мислења
-                        </span>
-                      )
-                    ) : (
-                      <span style={{ fontWeight: "normal" }}>
-                        <span style={{ fontWeight: "bold" }}>{totalPosts}</span>{" "}
-                        мислење
-                      </span>
-                    )}
-                  </EntityParam>
-                </EntityLi>
-              </EntityUl>
-            );
-          })}
-        </div>
-      </>
-    ) : (
-      loadedStudyProgrammes && (
-        <>
-          <CurrentPageNav>
-            &#187;{" "}
-            <a
-              href={
-                "/university/" + professors[0].faculty.university.universityId
-              }
-            >
-              {professors[0].faculty.university.universityName}
-            </a>{" "}
-            &#187; <a href="#">{professors[0].faculty.facultyName}</a>
-          </CurrentPageNav>
-          <ProfessorCard>
-            <ProfessorCardName>
-              {professors[0].faculty.facultyName}
-            </ProfessorCardName>
-            <ProfessorCardSeparator />
-            <ProfessorCardDetails fontSize="20px">
-              {professors[0].faculty.university.universityName}
-            </ProfessorCardDetails>
-          </ProfessorCard>
-          <div style={{ display: "flex" }}>
-            <EntityTypeSelector
-              boxshadow="2px 2px 5px #aaaaaa"
-              cursor="pointer"
-              boxshadowhover="2px 2px 10px #aaaaaa"
-              opacityhover="1"
-              onClick={() => setEntityType(0)}
-            >
-              Прикажи професори
-            </EntityTypeSelector>
-            <EntityTypeSelector
-              backgroundcolor="rgba(0, 102, 204, 1)"
-              color="white"
-              boxshadow="none"
-              boxshadowhover="none"
-              opacityhover="0.6"
-              cursor="auto"
-            >
-              Прикажи предмети
-            </EntityTypeSelector>
-          </div>
-          <div key={params.facultyId}>
-            {studyProgrammes.map((studyProgramme) => {
-              return (
-                <SubjectsAccordion
-                  key={studyProgramme.studyProgrammeId}
-                  title={studyProgramme}
-                ></SubjectsAccordion>
-              );
-            })}
-          </div>
-        </>
-      )
-    )
-  ) : !fetchError && !loadedProfessors ? (
-    <div>
-      <LoadingSpinner style={{ marginTop: "140px" }}/>
-      <Outlet />
-    </div>
-  ) : (
-    <div style={{ marginTop: "140px" }}>
-      <h1 style={{ textAlign: "center" }}>Страницата не е пронајдена.</h1>
-    </div>
-  );
-};
-
-export default Faculty;
Index: reactapp/src/Pages/Home.js
===================================================================
--- reactapp/src/Pages/Home.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Pages/Home.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -1,136 +1,33 @@
-import React, {useEffect, useState} from 'react';
-import JSOG from "jsog";
-import {OpinionCard, OpinionCardContent, OpinionCardContentTime} from "../Components/Styled/OpinionCard.style";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
-import {dateConverter} from "../Util/dateConverter";
-import {findParentThread} from "../Util/findParentThread";
-import {CurrentPageNav} from "../Components/Styled/Main.style";
+import React, { useContext } from "react";
+import { MainWrapper, MainTitle } from "../Components/Styled/Main.style";
+import { Outlet } from "react-router-dom";
+import Search from "../Components/Search";
+import UserHeader from "../Components/UserHeader";
+import AuthApi from "../api/AuthApi";
 
-const Home = () => {
-    const [latestOpinions, setLatestOpinions] = useState(null);
-    const [loadedLatestOpinions, setLoadedLatestOpinions] = useState(false);
-    const [latestThreads, setLatestThreads] = useState(null);
-    const [loadedLatestThreads, setLoadedLatestThreads] = useState(false);
+function Home({ user, userLoaded }) {
+  const { auth, setAuth } = useContext(AuthApi);
 
-    useEffect(() => {
-        Promise.all([fetch(`http://192.168.1.108:8080/public/latest10opinions`),
-            fetch(`http://192.168.1.108:8080/public/latest10threads`)])
-            .then(([resOpinions, resThreads]) => Promise.all([resOpinions.json(), resThreads.json()]))
-            .then(([dataOpinions, dataThreads]) => {
-                let cyclicGraph1 = dataOpinions;
-                let jsogStructure1 = JSOG.encode(cyclicGraph1);
-                cyclicGraph1 = JSOG.decode(jsogStructure1);
-                setLatestOpinions(cyclicGraph1);
-                setLoadedLatestOpinions(true);
-
-                let cyclicGraph2 = dataThreads;
-                let jsogStructure2 = JSOG.encode(cyclicGraph2);
-                cyclicGraph2 = JSOG.decode(jsogStructure2);
-                setLatestThreads(cyclicGraph2);
-                setLoadedLatestThreads(true);
-            })
-
-    }, []);
-
-    return (
-        <>
-            <CurrentPageNav>
-                &#187;{" "}
-                <a href={"/university/1"}>
-                    Универзитет „Св. Кирил и Методиј“
-                </a>
-            </CurrentPageNav>
-        <div style={{display:"grid", gridTemplateColumns:"1fr 1fr", gap:"40px", marginTop:"60px"}}>
-
-        <div id="latestOpinions" style={{gridColumn:"1", paddingLeft:"20px"}}>
-            <h2 style={{fontWeight:"normal", marginBottom:"30px"}}>Последни мислења за <span style={{fontWeight:"bold"}}>професори</span></h2>
-            {loadedLatestOpinions ? latestOpinions.slice(5).map(opinion => {
-                opinion.timePosted = undefined;
-                return <OpinionCard key={opinion.postId}>
-                    <OpinionCardContent>
-                        <p style={{marginBottom:"10px"}}>
-                        во дискусија за{" "}
-                        <a href={"/professor/" + opinion.targetProfessor.professorId}>
-                                    {opinion.targetProfessor.professorName}
-                        </a>
-                        </p>
-                        <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-                            <a href={"/user/" + opinion.author.id}>
-                                {opinion.author.username}
-                            </a>{" "}
-                            напишал
-                        </p>
-                        <p style={{ marginBottom: "10px", maxWidth: "90%" }}>
-                            {opinion.content}
-                        </p>
-                        {new Date(opinion.timePosted).setMilliseconds(0) === new Date(opinion.timeLastEdited).setMilliseconds(0) ? (
-                            <OpinionCardContentTime>
-                                {dateConverter(
-                                    new Date(opinion.timePosted).toString().slice(4, -43)
-                                )} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>
-                            </OpinionCardContentTime>
-                        ) : (
-                            <OpinionCardContentTime>
-                                {dateConverter(
-                                    new Date(opinion.timeLastEdited)
-                                        .toString()
-                                        .slice(4, -43)
-                                )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{opinion.postId}</span>{" "}
-                                (едитирано од модератор)
-                            </OpinionCardContentTime>
-                        )}
-                    </OpinionCardContent>
-                </OpinionCard>
-            }) : <LoadingSpinner/>}
-        </div>
-
-    <div id="latestThreads" style={{gridColumn:"2", paddingRight:"20px"}}>
-        <h2 style={{fontWeight:"normal", marginBottom:"30px"}}>Последни мислења за <span style={{fontWeight:"bold"}}>предмети</span></h2>
-        {loadedLatestThreads ? latestThreads.slice(5).map(thread => {
-            return <OpinionCard key={thread.postId}>
-                <OpinionCardContent>
-                    <p style={{marginBottom:"10px"}}>
-                        во дискусија за{" "}
-                        <a href={
-                                thread.parent === null
-                                    ? "/topic/" + thread.postId
-                                    : "/topic/" + findParentThread(thread).postId
-                            }
-                        > {thread.targetSubject.subjectName}
-                        </a>
-                    </p>
-                    <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-                        <a href={"/user/" + thread.author.id}>
-                            {thread.author.username}
-                        </a>{" "}
-                        напишал
-                    </p>
-                    <p style={{ marginBottom: "10px", maxWidth: "90%" }}>
-                        {thread.content}
-                    </p>
-                    {new Date(thread.timePosted).setMilliseconds(0) === new Date(thread.timeLastEdited).setMilliseconds(0) ? (
-                        <OpinionCardContentTime>
-                            {dateConverter(
-                                new Date(thread.timePosted).toString().slice(4, -43)
-                            )} <span style={{fontStyle:"normal",color:"blue"}}>#{thread.postId}</span>
-                        </OpinionCardContentTime>
-                    ) : (
-                        <OpinionCardContentTime>
-                            {dateConverter(
-                                new Date(thread.timeLastEdited)
-                                    .toString()
-                                    .slice(4, -43)
-                            )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{thread.postId}</span>{" "}
-                            (едитирано од модератор)
-                        </OpinionCardContentTime>
-                    )}
-                </OpinionCardContent>
-            </OpinionCard>
-        }) : null}
-    </div>
-        </div>
-        </>
-    );
-};
+  return (
+    <MainWrapper>
+      <style>
+        @import
+        url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
+      </style>
+      <style>
+        {
+          "body { background-color: papayawhip;} * {margin: 0; padding: 0; box-sizing: border-box;}"
+        }
+      </style>
+      <a href="/">
+        <MainTitle>profesori.mk</MainTitle>
+      </a>{" "}
+      <Search />
+      {auth && <UserHeader user={user} userLoaded={userLoaded} />}
+      <div style={{ marginTop: "140px" }}></div>
+      <Outlet />
+    </MainWrapper>
+  );
+}
 
 export default Home;
Index: reactapp/src/Pages/Login.js
===================================================================
--- reactapp/src/Pages/Login.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Pages/Login.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -4,5 +4,4 @@
 import axios from "../api/axios";
 import Cookies from "js-cookie";
-import { LoginButton, LoginInput } from "../Components/Styled/Login.style";
 const LOGIN_URL = "/login";
 
@@ -17,5 +16,5 @@
 
   useEffect(() => {
-    if (!auth) userRef.current.focus();
+    userRef.current.focus();
   }, []);
 
@@ -35,8 +34,5 @@
     if (!response.request.responseURL.includes("error")) {
       // ako NE redirektira na /login?error
-      var in30Minutes = 1 / 48;
-      Cookies.set("JSESSIONID", response.data.sessionId, {
-        expires: in30Minutes,
-      });
+      Cookies.set("JSESSIONID", response.data.sessionId);
       setAuth(true);
       setErrMsg("");
@@ -52,29 +48,12 @@
     <Navigate to="/user_dashboard" />
   ) : (
-    <div
-      style={{
-        marginTop: "140px",
-        display: "flex",
-        alignItems: "center",
-        flexFlow: "column",
-        width: "fit-content",
-        margin: "auto",
-        border: "2px solid lightgrey",
-        padding: "25px",
-        boxShadow: "2px 2px 6px #aaaaaa",
-        marginBottom: "80px",
-      }}
-    >
-      <h2>Најава</h2>
-      <form
-        onSubmit={handleSubmit}
-        style={{
-          display: "flex",
-          flexDirection: "column",
-          alignItems: "center",
-          width: "400px",
-        }}
-      >
-        <LoginInput
+    <div style={{ marginTop: "140px" }}>
+      <p ref={errRef} className={errMsg ? "errmsg" : "offscreen"}>
+        {errMsg}
+      </p>
+      <h1>Најава</h1>
+      <form onSubmit={handleSubmit}>
+        <label htmlFor="username">E-mail:</label>
+        <input
           type="text"
           id="username"
@@ -84,26 +63,15 @@
           value={username}
           required
-          placeholder="Email"
         />
-        <LoginInput
+        <label htmlFor="password">Лозинка:</label>
+        <input
           type="password"
           id="password"
           onChange={(e) => setPassword(e.target.value)}
           value={password}
-          placeholder="Лозинка"
           required
         />
-        <LoginButton>Најави се</LoginButton>
-        <p
-          ref={errRef}
-          className={errMsg ? "errmsg" : "offscreen"}
-          style={{ color: "red", marginTop: "20px" }}
-        >
-          {errMsg}
-        </p>
+        <button>Најави се</button>
       </form>
-      <p style={{ marginTop: "20px" }}>
-        Немаш сметка? <a href="/registration">Регистрирај се</a>{" "}
-      </p>
     </div>
   );
Index: reactapp/src/Pages/NotFound.js
===================================================================
--- reactapp/src/Pages/NotFound.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,23 +1,0 @@
-import React from "react";
-import { MainWrapper } from "../Components/Styled/Main.style";
-import { MainTitle } from "../Components/Styled/Main.style";
-
-const NotFound = () => {
-  return (
-    <MainWrapper>
-      <style>
-        {
-          "body { background-color: papayawhip;} * {margin: 0; padding: 0; box-sizing: border-box;}"
-        }
-      </style>
-      <a href="/">
-        <MainTitle>profesori.mk</MainTitle>
-      </a>{" "}
-      <div style={{ marginTop: "140px" }}>
-        <h1 style={{ textAlign: "center" }}>Страницата не е пронајдена.</h1>
-      </div>
-    </MainWrapper>
-  );
-};
-
-export default NotFound;
Index: reactapp/src/Pages/Professor.js
===================================================================
--- reactapp/src/Pages/Professor.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Pages/Professor.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -23,46 +23,38 @@
 import { useNavigate } from "react-router-dom";
 import axios from "../api/axios";
-import { CurrentPageNav } from "../Components/Styled/Main.style";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
 
-function Professor() {
+function Professor(user, userLoaded) {
   let params = useParams();
+
+  let [professor, setProfessor] = useState(null);
+  let [loaded, setLoaded] = useState(null);
+  let [postModalDisplay, setPostModalDisplay] = useState("none");
   let navigate = useNavigate();
-
-  const [professor, setProfessor] = useState(null);
-  const [loadedProfessor, setLoadedProfessor] = useState(false);
-  const [relatedOpinions, setRelatedOpinions] = useState(null);
-  const [loadedRelatedOpinions, setLoadedRelatedOpinions] = useState(false);
-
-  const [postModalDisplay, setPostModalDisplay] = useState("none");
   const { auth, setAuth } = useContext(AuthApi);
+  const [postTitle, setPostTitle] = useState("");
   const [postContent, setPostContent] = useState("");
-  const [fetchError, setFetchError] = useState(false);
-  const [errorMessage, setErrorMessage] = useState("");
 
   useEffect(() => {
-     Promise.all([fetch(`http://192.168.1.108:8080/public/professor/${params.professorId}`),
-     fetch(`http://192.168.1.108:8080/public/professor/${params.professorId}/relatedOpinions`)])
-        .then(([resProfessor, resRelatedOpinions]) => Promise.all([resProfessor.json(), resRelatedOpinions.json()]))
-        .then(([dataProfessor, dataRelatedOpinions]) => {
-          let cyclicGraph1 = dataProfessor;
-          let jsogStructure1 = JSOG.encode(cyclicGraph1);
-          cyclicGraph1 = JSOG.decode(jsogStructure1);
-          setProfessor(cyclicGraph1);
-          setLoadedProfessor(true);
+    const url = `http://192.168.0.17:8080/public/professor/${params.professorId}`;
 
-          let cyclicGraph2 = dataRelatedOpinions;
-          let jsogStructure2 = JSOG.encode(cyclicGraph2);
-          cyclicGraph2 = JSOG.decode(jsogStructure2);
-          setRelatedOpinions(cyclicGraph2);
-          setLoadedRelatedOpinions(true);
-        })
+    const fetchData = async () => {
+      try {
+        const response = await fetch(url);
+        var cyclicGraph = await response.json();
+        var jsogStructure = JSOG.encode(cyclicGraph);
+        cyclicGraph = JSOG.decode(jsogStructure);
+        setProfessor(cyclicGraph);
+        setLoaded(true);
+      } catch (error) {
+        console.log("Fetching error", error);
+      }
+    };
 
-  }, []);
+    fetchData();
+  }, [params.professorId]);
 
   const handleAddOpinionButtonClick = () => {
     if (auth) {
       setPostModalDisplay("block");
-      document.body.style.overflowY = "hidden";
     } else {
       navigate("/login");
@@ -72,5 +64,4 @@
   const handleModalCloseClick = () => {
     setPostModalDisplay("none");
-    document.body.style.overflowY = "auto";
   };
 
@@ -78,20 +69,21 @@
     e.preventDefault();
 
-    if (!postContent.length < 1) {
-      const response = await axios(
-        `http://192.168.1.108:8080/secure/professor/${params.professorId}/addOpinion`,
-        {
-          method: "post",
-          data: {
-            content: postContent,
-          },
-          withCredentials: true,
-        }
-      );
-      setErrorMessage("");
-      window.location.reload();
-    } else {
-      setErrorMessage("Полето за содржина не смее да биде празно");
-    }
+    const response = await axios(
+      `http://192.168.0.17:8080/secure/professor/${professor.professorId}/addOpinion`,
+      {
+        method: "post",
+        data: {
+          title: postTitle,
+          content: postContent,
+        },
+        withCredentials: true,
+      }
+    );
+
+    window.location.reload(false);
+  };
+
+  const handleTitleChange = (e) => {
+    setPostTitle(e.target.value);
   };
 
@@ -100,20 +92,9 @@
   };
 
-  if (loadedProfessor) {
+  if (loaded) {
     return (
       <div>
-        <CurrentPageNav>
-          &#187;{" "}
-          <a href={"/university/" + professor.faculty.university.universityId}>
-            {professor.faculty.university.universityName}
-          </a>{" "}
-          &#187;{" "}
-          <a href={"/faculty/" + professor.faculty.facultyId}>
-            {professor.faculty.facultyName}
-          </a>{" "}
-          &#187; <a href="#">{professor.professorName}</a>
-        </CurrentPageNav>
         <ProfessorCard>
-          <ProfessorCardName>{professor.professorName} <span style={{opacity:"50%", fontSize:"16px"}}>#{professor.professorId}</span></ProfessorCardName>
+          <ProfessorCardName>{professor.professorName}</ProfessorCardName>
           <ProfessorCardSeparator />
           <div style={{ marginTop: "10px" }}>
@@ -126,5 +107,5 @@
           </div>
         </ProfessorCard>
-        <div style={{ height: "20px", marginBottom: "50px" }}>
+        <div style={{ height: "20px", marginBottom: "30px" }}>
           <h3
             style={{
@@ -132,6 +113,6 @@
             }}
           >
-            {relatedOpinions.length}{" "}
-            {relatedOpinions.length !== 1 ? "мислења" : "мислење"}
+            {professor.relatedOpinions.length}{" "}
+            {professor.relatedOpinions.length !== 1 ? "мислења" : "мислење"}
           </h3>
           {auth && (
@@ -152,4 +133,13 @@
             <form onSubmit={handlePostSubmit}>
               <ModalBody>
+                <label htmlFor="title">
+                  <b>Наслов</b>:
+                  <ModalInput
+                    id="title"
+                    type="text"
+                    value={postTitle}
+                    onChange={handleTitleChange}
+                  />
+                </label>
                 <label htmlFor="content">
                   <b>Содржина</b>:
@@ -158,5 +148,4 @@
                     rows="8"
                     cols="100"
-                    spellCheck={false}
                     value={postContent}
                     onChange={handleContentChange}
@@ -164,9 +153,4 @@
                 </label>
               </ModalBody>
-              <p
-                style={{ color: "red", marginLeft: "15px", marginTop: "10px" }}
-              >
-                {errorMessage}
-              </p>
               <ModalFooter type="submit">ОБЈАВИ</ModalFooter>
             </form>
@@ -175,13 +159,10 @@
 
         <div className="opinionTree">
-          <OpinionTree professor={professor} relatedOpinions={relatedOpinions}/>
+          <OpinionTree
+            professor={professor}
+            user={user}
+            userLoaded={userLoaded}
+          />
         </div>
-        <Outlet />
-      </div>
-    );
-  } else if (!fetchError) {
-    return (
-      <div>
-        <LoadingSpinner style={{ marginTop: "140px" }}/>
         <Outlet />
       </div>
@@ -189,6 +170,7 @@
   } else {
     return (
-      <div style={{ marginTop: "140px" }}>
-        <h1 style={{ textAlign: "center" }}>Страницата не е пронајдена.</h1>
+      <div>
+        <p style={{ marginTop: "140px" }}>се вчитува...</p>
+        <Outlet />
       </div>
     );
Index: reactapp/src/Pages/PublicUserProfile.js
===================================================================
--- reactapp/src/Pages/PublicUserProfile.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,57 +1,0 @@
-import React, {useEffect, useState} from 'react';
-import {UserDetailsCard, UserDetailsCardContent} from "../Components/Styled/UserDetails.style";
-import {useParams} from "react-router-dom";
-import JSOG from "jsog";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
-
-const PublicUserProfile = () => {
-    let params = useParams();
-
-    const [publicProfile, setPublicProfile] = useState(null);
-    const [loadedPublicProfile, setLoadedPublicProfile] = useState(false);
-
-    useEffect(() => {
-            const fetchPublicProfile = async () => {
-                const resp = await fetch(`http://192.168.1.108:8080/public/user/${params.userId}`)
-                let cyclicGraph = await resp.json();
-                let jsogStructure = JSOG.encode(cyclicGraph);
-                cyclicGraph = JSOG.decode(jsogStructure);
-                setPublicProfile(cyclicGraph);
-                setLoadedPublicProfile(true);
-            }
-            fetchPublicProfile();
-        },
-        []
-    )
-
-    return <>
-        {loadedPublicProfile ?
-            (<>
-                <h3>Кориснички податоци за корисник #{publicProfile.id}:</h3>
-            <UserDetailsCard>
-                {publicProfile.fullName && (
-                    <UserDetailsCardContent>
-                        <b>Име:</b> {publicProfile.fullName}{" "}
-                    </UserDetailsCardContent>
-                )}
-                <UserDetailsCardContent>
-                    <b>Корисничко име:</b> {publicProfile.username}{" "}
-                </UserDetailsCardContent>
-                <UserDetailsCardContent>
-                    <b>E-mail:</b> {publicProfile.email}
-                </UserDetailsCardContent>
-                <UserDetailsCardContent>
-                    <b>Карма:</b>{" "}
-                    <span style={{color: publicProfile.karma < 0 ? "indianred" : "green"}}>
-                {publicProfile.karma}
-              </span>
-                </UserDetailsCardContent>
-            </UserDetailsCard>
-            </>)
-            :
-            <LoadingSpinner/>
-        }
-    </>
-};
-
-export default PublicUserProfile;
Index: reactapp/src/Pages/Registration.js
===================================================================
--- reactapp/src/Pages/Registration.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,195 +1,0 @@
-import React, { useRef, useState, useEffect, useContext } from "react";
-import axios from "../api/axios";
-import {
-  FieldConstraintModal,
-  LoginButton,
-  LoginInput,
-  RequiredAsterisk,
-} from "../Components/Styled/Login.style";
-import { Navigate } from "react-router-dom";
-import AuthApi from "../api/AuthApi";
-const REGISTRATION_URL = "/registration";
-
-const Registration = () => {
-  const { auth, setAuth } = useContext(AuthApi);
-  const userRef = useRef();
-  const errRef = useRef();
-
-  const [fullName, setFullName] = useState("");
-  const [username, setUsername] = useState("");
-  const [email, setEmail] = useState("");
-  const [password, setPassword] = useState("");
-  const [errMsg, setErrMsg] = useState("");
-
-  const [registrationSuccessful, setRegistrationSuccessful] = useState(false);
-
-  useEffect(() => {
-    userRef.current.focus();
-  }, []);
-
-  const handleSubmit = async (e) => {
-    e.preventDefault();
-
-    try {
-      const response = await axios(REGISTRATION_URL, {
-        method: "post",
-        headers: { "Content-Type": "application/json" },
-        data: {
-          fullName: fullName,
-          username: username,
-          email: email,
-          password: password,
-        },
-      });
-      setRegistrationSuccessful(true);
-    } catch (error) {
-      setErrMsg("Некои од полињата се неправилни.");
-    }
-  };
-
-  const [FieldConstraintModalOpacity1, setFieldConstraintModalOpacity1] =
-    useState(0);
-  const [FieldConstraintModalOpacity2, setFieldConstraintModalOpacity2] =
-    useState(0);
-
-  return auth ? (
-    <Navigate to="/user_dashboard" />
-  ) : registrationSuccessful === false ? (
-    <div
-      style={{
-        marginTop: "140px",
-        display: "flex",
-        alignItems: "center",
-        flexFlow: "column",
-        width: "fit-content",
-        margin: "auto",
-        border: "2px solid lightgrey",
-        padding: "25px",
-        boxShadow: "2px 2px 6px #aaaaaa",
-        marginBottom: "80px",
-        position: "relative",
-      }}
-    >
-      <h2>Регистрација</h2>
-      <form
-        onSubmit={handleSubmit}
-        style={{
-          display: "flex",
-          flexDirection: "column",
-          alignItems: "center",
-          width: "400px",
-        }}
-      >
-        <LoginInput
-          type="text"
-          id="fullName"
-          ref={userRef}
-          autoComplete="off"
-          onChange={(e) => setFullName(e.target.value)}
-          value={fullName}
-          placeholder="Име"
-          maxLength={42}
-        />
-        <LoginInput
-          type="text"
-          id="username"
-          autoComplete="off"
-          onChange={(e) => setUsername(e.target.value)}
-          value={username}
-          required
-          placeholder="Корисничко име"
-          maxLength={42}
-          onFocus={(e) => {
-            setFieldConstraintModalOpacity1(1);
-          }}
-          onBlur={(e) => {
-            setFieldConstraintModalOpacity1(0);
-          }}
-        />
-        <RequiredAsterisk top="142px">*</RequiredAsterisk>
-        <LoginInput
-          type="text"
-          id="email"
-          autoComplete="off"
-          onChange={(e) => setEmail(e.target.value)}
-          value={email}
-          required
-          placeholder="Email"
-          maxLength={42}
-        />
-        <RequiredAsterisk top="206px">*</RequiredAsterisk>
-        <LoginInput
-          type="password"
-          id="password"
-          onChange={(e) => setPassword(e.target.value)}
-          value={password}
-          placeholder="Лозинка"
-          required
-          maxLength={36}
-          onFocus={(e) => {
-            setFieldConstraintModalOpacity2(1);
-          }}
-          onBlur={(e) => {
-            setFieldConstraintModalOpacity2(0);
-          }}
-        />
-        <RequiredAsterisk top="270px">*</RequiredAsterisk>
-        <p style={{ marginBottom: "10px", marginTop: "5px", fontSize: "14px" }}>
-          Означените полиња се задолжителни.
-        </p>
-        <LoginButton>Регистрирај се</LoginButton>
-        <p
-          ref={errRef}
-          className={errMsg ? "errmsg" : "offscreen"}
-          style={{ color: "red", marginTop: "20px" }}
-        >
-          {errMsg}
-        </p>
-      </form>
-
-      <FieldConstraintModal
-        opacity={FieldConstraintModalOpacity1}
-        right="-420px"
-        top="100px"
-      >
-        Корисничкото име мора да е составено од 6-30 алфанумерички знаци и долни
-        црти (_) и мора да започнува со буква.
-      </FieldConstraintModal>
-
-      <FieldConstraintModal
-        opacity={FieldConstraintModalOpacity2}
-        right="-420px"
-        top="230px"
-      >
-        Лозинката мора да биде долга 8-20 знаци и да содржи барем една цифра,
-        една голема, една мала буква и еден од знаците !@#$%&*()-+=^.
-      </FieldConstraintModal>
-    </div>
-  ) : (
-    <div
-      style={{
-        marginTop: "140px",
-        display: "flex",
-        alignItems: "center",
-        flexFlow: "column",
-        width: "fit-content",
-        margin: "auto",
-        border: "2px solid lightgrey",
-        padding: "25px",
-        boxShadow: "2px 2px 6px #aaaaaa",
-        marginBottom: "80px",
-        position: "relative",
-      }}
-    >
-      <p>
-        Успешна регистрација! На <b>{email}</b> е испратен токен за потврда на
-        сметката.
-      </p>
-      <a href="/login" style={{ marginTop: "15px" }}>
-        Оди на најава
-      </a>
-    </div>
-  );
-};
-
-export default Registration;
Index: reactapp/src/Pages/SearchResults.js
===================================================================
--- reactapp/src/Pages/SearchResults.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Pages/SearchResults.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -14,12 +14,12 @@
     <SearchResultsWrapper>
       <h3 style={{ marginBottom: "30px" }}>Резултати од пребарувањето:</h3>
-      {location.state.map((match) => (
-        <SearchResult key={match.professorId !== undefined ? match.professorId : match.subjectId} margin="10px">
-          <SearchResultLink href={`/${match.professorId !== undefined ? 'professor': 'subject'}/` + `${match.professorId !== undefined ? match.professorId : match.subjectId}`}>
+      {location.state.map((professor) => (
+        <SearchResult key={professor.professorId} margin="10px">
+          <SearchResultLink href={"/professor/" + professor.professorId}>
             <SearchResultText weight="bold" size="medium">
-              {match.professorId !== undefined ? match.professorName : match.subjectName}
+              {professor.professorName}
             </SearchResultText>
             <SearchResultText weight="normal" size="er">
-              {match.professorId !== undefined ? match.faculty.facultyName : match.studyProgramme.faculty.facultyName}
+              {professor.faculty.facultyName}
             </SearchResultText>
           </SearchResultLink>
Index: reactapp/src/Pages/Subject.js
===================================================================
--- reactapp/src/Pages/Subject.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,286 +1,0 @@
-import React, { useState, useEffect, useContext } from "react";
-import { useNavigate, useParams } from "react-router-dom";
-import JSOG from "jsog";
-import { Outlet } from "react-router-dom";
-import { CurrentPageNav } from "../Components/Styled/Main.style";
-import {
-  ProfessorCard,
-  ProfessorCardDetails,
-  ProfessorCardName,
-  ProfessorCardSeparator,
-} from "../Components/Styled/ProfessorCard.style";
-import AuthApi from "../api/AuthApi";
-import { AddOpinionButton } from "../Components/Styled/Modal.style";
-import {
-  EntityLi,
-  EntityUl,
-  EntityParam,
-} from "../Components/Styled/EntityList.style";
-import {
-  Modal,
-  ModalBody,
-  ModalClose,
-  ModalContent,
-  ModalFooter,
-  ModalHeader,
-  ModalInput,
-  ModalTextarea,
-} from "../Components/Styled/Modal.style";
-import axios from "../api/axios";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
-
-const Subject = () => {
-  let params = useParams();
-  let navigate = useNavigate();
-  const { auth, setAuth } = useContext(AuthApi);
-
-  const [subject, setSubject] = useState(null);
-  const [loadedSubject, setLoadedSubject] = useState(false);
-  const [threads, setThreads] = useState(null);
-  const [loadedThreads, setLoadedThreads] = useState(false);
-  const [fetchError, setFetchError] = useState(false);
-
-  var totalTopics = 0;
-  var topics = [];
-
-  const [topicModalDisplay, setTopicModalDisplay] = useState("none");
-  const [topicTitle, setTopicTitle] = useState("");
-  const [topicContent, setTopicContent] = useState("");
-  const [errorMessage, setErrorMessage] = useState("");
-
-  useEffect(() => {
-    Promise.all([fetch(`http://192.168.1.108:8080/public/subject/${params.subjectId}`),
-                        fetch(`http://192.168.1.108:8080/public/subject/${params.subjectId}/threads`)])
-        .then(([resSubject, resThreads]) => Promise.all([resSubject.json(), resThreads.json()]))
-        .then(([dataSubject, dataThreads]) => {
-          let cyclicGraph1 = dataSubject;
-          let jsogStructure1 = JSOG.encode(cyclicGraph1);
-          cyclicGraph1 = JSOG.decode(jsogStructure1);
-          setSubject(cyclicGraph1);
-          setLoadedSubject(true);
-
-          let cyclicGraph2 = dataThreads;
-          let jsogStructure2 = JSOG.encode(cyclicGraph2);
-          cyclicGraph2 = JSOG.decode(jsogStructure2);
-          setThreads(cyclicGraph2);
-          setLoadedThreads(true);
-        })
-
-  }, []);
-
-  const handleAddTopicButtonClick = () => {
-    if (auth) {
-      setTopicModalDisplay("block");
-      document.body.style.overflowY = "hidden";
-    } else {
-      navigate("/login");
-    }
-  };
-
-  const handleModalCloseClick = () => {
-    setTopicModalDisplay("none");
-    document.body.style.overflowY = "auto";
-  };
-
-  const handleTopicSubmit = async (e) => {
-    e.preventDefault();
-
-    if (!topicTitle.length < 1 && !topicContent.length < 1) {
-      const response = await axios(
-        `http://192.168.1.108:8080/secure/subject/${params.subjectId}/addThread`,
-        {
-          method: "post",
-          data: {
-            title: topicTitle,
-            content: topicContent,
-          },
-          withCredentials: true,
-        }
-      );
-      setErrorMessage("");
-      window.location.reload();
-    } else {
-      setErrorMessage("Полињата за наслов и содржина не смеат да бидат празни");
-    }
-  };
-
-  const handleContentChange = (e) => {
-    setTopicContent(e.target.value);
-  };
-
-  const handleTitleChange = (e) => {
-    setTopicTitle(e.target.value);
-  };
-
-  return loadedSubject ? (
-    <>
-      <CurrentPageNav>
-        &#187;{" "}
-        <a
-          href={
-            "/university/" +
-            subject.studyProgramme.faculty.university.universityId
-          }
-        >
-          {subject.studyProgramme.faculty.university.universityName}
-        </a>{" "}
-        &#187;{" "}
-        <a href={"/faculty/" + subject.studyProgramme.faculty.facultyId}>
-          {subject.studyProgramme.faculty.facultyName}
-        </a>{" "}
-        &#187; <a href="#">{subject.subjectName}</a>
-      </CurrentPageNav>
-      <ProfessorCard>
-        <ProfessorCardName>{subject.subjectName} <span style={{opacity:"50%", fontSize:"16px"}}>#{subject.subjectId}</span></ProfessorCardName>
-        <ProfessorCardSeparator />
-        <div style={{ marginTop: "10px" }}>
-          <ProfessorCardDetails fontSize="20px">
-            {subject.studyProgramme.studyProgrammeName} (
-            {subject.studyProgramme.cycle}
-            {"."}
-            {"циклус"})
-          </ProfessorCardDetails>
-          <ProfessorCardDetails fontSize="20px">
-            {subject.studyProgramme.faculty.facultyName}
-          </ProfessorCardDetails>
-          <ProfessorCardDetails fontSize="15px">
-            {subject.studyProgramme.faculty.university.universityName}
-          </ProfessorCardDetails>
-        </div>
-      </ProfessorCard>
-      <div style={{ height: "20px", marginBottom: "50px" }}>
-        <h3
-          style={{
-            float: "left",
-          }}
-        >
-          {threads.map((thread) => {
-            if (thread.parent === null) {
-              totalTopics++;
-              topics.push(thread);
-            }
-          })}
-          {totalTopics} {totalTopics !== 1 ? "теми" : "тема"}
-        </h3>
-        {auth && (
-          <AddOpinionButton onClick={handleAddTopicButtonClick}>
-            Отвори тема
-          </AddOpinionButton>
-        )}
-      </div>
-      <Modal display={topicModalDisplay}>
-        <ModalContent>
-          <ModalHeader>
-            <ModalClose onClick={handleModalCloseClick}>&times;</ModalClose>
-            <h3 style={{ marginTop: "5px" }}>
-              Тема во врска со {subject.subjectName}
-            </h3>
-          </ModalHeader>
-          <form onSubmit={handleTopicSubmit}>
-            <ModalBody>
-              <label htmlFor="title">
-                <b>Наслов</b>:
-                <ModalInput
-                  id="title"
-                  value={topicTitle}
-                  onChange={handleTitleChange}
-                  spellCheck={false}
-                />
-              </label>
-              <label htmlFor="content">
-                <b>Содржина</b>:
-                <ModalTextarea
-                  id="content"
-                  rows="8"
-                  cols="100"
-                  value={topicContent}
-                  onChange={handleContentChange}
-                  spellCheck={false}
-                />
-              </label>
-            </ModalBody>
-            <p style={{ color: "red", marginLeft: "15px", marginTop: "10px" }}>
-              {errorMessage}
-            </p>
-            <ModalFooter type="submit">ОБЈАВИ</ModalFooter>
-          </form>
-        </ModalContent>
-      </Modal>
-      <div key={subject.subjectId}>
-        {topics.map((topic) => {
-          var numReplies = 0;
-          topic.children.map((c)=>numReplies += ++c.children.length); // ++c.children.length -> c + decata na c
-          return (
-            <EntityUl key={topic.postId}>
-              <EntityLi bgcolor="cornsilk">
-                <a href={"/topic/" + topic.postId}>{topic.title.length >= 65 ? topic.title.slice(0,65) + "..." : topic.title}</a>
-                <EntityParam right="30px">
-                  <span style={{ fontWeight: "normal" }}>
-                    отворил:{" "}
-                    <a href={"/user/" + topic.author.id}>
-                      {topic.author.username}
-                    </a>
-                  </span>
-                  <span style={{ fontStyle: "normal" }}>,</span>{" "}
-                  {numReplies !== 1 ? (
-                    numReplies !== 0 ? (
-                      <span
-                        style={{
-                          fontWeight: "normal",
-                          opacity: numReplies === 0 ? "0.5" : "1",
-                        }}
-                      >
-                        <span
-                          style={{
-                            fontWeight: "bold",
-                            opacity: numReplies === 0 ? "0.5" : "1",
-                          }}
-                        >
-                          {numReplies}
-                        </span>{" "}
-                        реплики
-                      </span>
-                    ) : (
-                      <span
-                        style={{
-                          fontWeight: "normal",
-                          opacity: numReplies === 0 ? "0.5" : "1",
-                        }}
-                      >
-                        <span
-                          style={{
-                            fontWeight: "bold",
-                            opacity: numReplies === 0 ? "0.5" : "1",
-                          }}
-                        >
-                          {numReplies}
-                        </span>{" "}
-                        реплики
-                      </span>
-                    )
-                  ) : (
-                    <span style={{ fontWeight: "normal" }}>
-                      <span style={{ fontWeight: "bold" }}>{numReplies}</span>{" "}
-                      реплика
-                    </span>
-                  )}
-                </EntityParam>
-              </EntityLi>
-            </EntityUl>
-          );
-        })}
-      </div>
-    </>
-  ) : !fetchError ? (
-    <div>
-      <LoadingSpinner style={{ marginTop: "140px" }}/>
-      <Outlet />
-    </div>
-  ) : (
-    <div style={{ marginTop: "140px" }}>
-      <h1 style={{ textAlign: "center" }}>Страницата не е пронајдена.</h1>
-    </div>
-  );
-};
-
-export default Subject;
Index: reactapp/src/Pages/Topic.js
===================================================================
--- reactapp/src/Pages/Topic.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,667 +1,0 @@
-import React, { useState, useEffect, useContext } from "react";
-import { useParams, Outlet } from "react-router-dom";
-import JSOG from "jsog";
-import { CurrentPageNav } from "../Components/Styled/Main.style";
-import AuthApi from "../api/AuthApi";
-import { useNavigate } from "react-router-dom";
-import {
-  OpinionCard,
-  OpinionCardContent,
-  OpinionCardContentTime,
-  OpinionReplyCard,
-  OpinionReplyCardContent,
-  OpinionReplyCardContentTime,
-  VoteCount,
-} from "../Components/Styled/OpinionCard.style";
-import { dateConverter } from "../Util/dateConverter";
-import { StyledFontAwesomeIcon } from "../Components/Styled/OpinionCard.style";
-import { solid } from "@fortawesome/fontawesome-svg-core/import.macro";
-import {
-  AddOpinionButton,
-  Modal,
-  ModalContent,
-  ModalHeader,
-  ModalClose,
-  ModalBody,
-  ModalTextarea,
-  ModalFooter,
-} from "../Components/Styled/Modal.style";
-import axios from "../api/axios";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
-
-const Topic = () => {
-  let params = useParams();
-  let navigate = useNavigate();
-  const { auth, setAuth } = useContext(AuthApi);
-
-  const [thread, setThread] = useState(null);
-  const [loadedThread, setLoadedThread] = useState(false);
-  const [user, setUser] = useState(null);
-  const [loadedUser, setLoadedUser] = useState(false);
-  const [fetchError, setFetchError] = useState(false);
-
-  const [postModalDisplay, setPostModalDisplay] = useState("none");
-  const [postContent, setPostContent] = useState("");
-
-  const [replyModalDisplay, setReplyModalDisplay] = useState("none");
-  const [replyContent, setReplyContent] = useState("");
-  const [postForReplyModal, setPostForReplyModal] = useState(null);
-
-  const [reportModalDisplay, setReportModalDisplay] = useState("none");
-  const [reportContent, setReportContent] = useState("");
-  const [postForReportModal, setPostForReportModal] = useState(null);
-
-  const [errorMessage, setErrorMessage] = useState("");
-
-  useEffect(() => {
-    const url1 = `http://192.168.1.108:8080/public/thread/${params.topicId}`;
-    const url2 = `http://192.168.1.108:8080/secure/currentUser`;
-
-    const fetchTopic = async () => {
-      try {
-        const response = await fetch(url1);
-        let cyclicGraph = await response.json();
-        let jsogStructure = JSOG.encode(cyclicGraph);
-        cyclicGraph = JSOG.decode(jsogStructure);
-        setThread(cyclicGraph);
-        setLoadedThread(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    const fetchUser = async () => {
-      try {
-        const response = await axios.get(url2, { withCredentials: true });
-        var cyclicGraph = await response.data;
-        var jsogStructure = JSOG.encode(cyclicGraph);
-        cyclicGraph = JSOG.decode(jsogStructure);
-        setUser(cyclicGraph);
-        setLoadedUser(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    fetchTopic().then(fetchUser);
-  }, [loadedThread]);
-
-  const handleReply = (post) => {
-    if (auth) {
-      setReplyModalDisplay("block");
-      setPostForReplyModal(post);
-      document.body.style.overflowY = "hidden";
-    } else {
-      navigate("/login");
-    }
-  };
-
-  const handleReport = (post) => {
-    if (auth) {
-      setReportModalDisplay("block");
-      setPostForReportModal(post);
-      document.body.style.overflowY = "hidden";
-    } else {
-      navigate("/login");
-    }
-  };
-
-  const handleReplyContentChange = (e) => {
-    setReplyContent(e.target.value);
-  };
-
-  const handleReportContentChange = (e) => {
-    e.preventDefault();
-    setReportContent(e.target.value);
-  };
-
-  const handleReplySubmit = async (e, postId) => {
-    e.preventDefault();
-
-    if (!replyContent.length < 1) {
-      const response = await axios(
-        `http://192.168.1.108:8080/secure/subject/${thread.targetSubject.subjectId}/replyToThread/${postId}`,
-        {
-          method: "post",
-          data: {
-            content: replyContent,
-          },
-          withCredentials: true,
-        }
-      );
-      setErrorMessage("");
-      window.location.reload();
-    } else {
-      setErrorMessage("Полето за содржина не смее да биде празно");
-    }
-  };
-
-  const handleReportSubmit = async (e, postId) => {
-    e.preventDefault();
-
-    if (!reportContent.length < 1) {
-      const response = await axios(
-          `http://192.168.1.108:8080/secure/reportThread/${postId}`,
-          {
-            method: "post",
-            data: {
-              description: reportContent,
-            },
-            withCredentials: true,
-          }
-      );
-      setErrorMessage("");
-      window.location.reload();
-    } else {
-      setErrorMessage("Полето за содржина не смее да биде празно");
-    }
-  };
-
-  const handleAddOpinionButtonClick = () => {
-    if (auth) {
-      setPostModalDisplay("block");
-      document.body.style.overflowY = "hidden";
-    } else {
-      navigate("/login");
-    }
-  };
-
-  const handlePostSubmit = async (e) => {
-    e.preventDefault();
-    if (!postContent.length < 1) {
-      const response = await axios(
-        `http://192.168.1.108:8080/secure/subject/${thread.targetSubject.subjectId}/replyToThread/${params.topicId}`,
-        {
-          method: "post",
-          data: {
-            content: postContent,
-          },
-          withCredentials: true,
-        }
-      );
-      setErrorMessage("");
-      window.location.reload();
-    } else {
-      setErrorMessage("Полето за содржина не смее да биде празно");
-    }
-  };
-  const handleModalCloseClick = () => {
-    setPostModalDisplay("none");
-    setReplyModalDisplay("none");
-    setReportModalDisplay("none");
-    document.body.style.overflowY = "auto";
-  };
-  const handleContentChange = (e) => {
-    setPostContent(e.target.value);
-  };
-
-  const handleLike = async (post) => {
-    if (auth) {
-      if (
-        loadedUser &&
-        user &&
-        !post.votes.some((e) => e.user.id === user.id)
-      ) {
-        const response = await axios(
-          `http://192.168.1.108:8080/secure/upvoteThread/${post.postId}`,
-          {
-            method: "get",
-            withCredentials: true,
-          }
-        );
-        window.location.reload();
-      } else {
-        return;
-      }
-    } else {
-      navigate("/login");
-    }
-  };
-
-  const handleDislike = async (post) => {
-    if (auth) {
-      if (
-        loadedUser &&
-        user &&
-        !post.votes.some((e) => e.user.id === user.id)
-      ) {
-        const response = await axios(
-          `http://192.168.1.108:8080/secure/downvoteThread/${post.postId}`,
-          {
-            method: "get",
-            withCredentials: true,
-          }
-        );
-
-        window.location.reload();
-      } else {
-        return;
-      }
-    } else {
-      navigate("/login");
-    }
-  };
-
-  function displayChildPosts(child, parentPostAuthorUsername, replyIndent) {
-    if (child == null) return;
-    //postCount = renderedOpinionIds.push(child.postId);
-    return (
-      <div key={child.postId}>
-        <OpinionReplyCard indent={replyIndent + "px"}>
-          <OpinionReplyCardContent>
-            <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-              <a href={"/user/" + child.author.id}>{child.author.username}</a>{" "}
-              му реплицирал на {parentPostAuthorUsername}
-            </p>
-            <p style={{ marginBottom: "10px", maxWidth: "90%" }}>
-              {child.content}
-            </p>
-            {new Date(child.timePosted).setMilliseconds(0) === new Date(child.timeLastEdited).setMilliseconds(0) ? (
-              <OpinionCardContentTime>
-                {dateConverter(
-                  new Date(child.timePosted).toString().slice(4, -43)
-                )} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>
-              </OpinionCardContentTime>
-            ) : (
-              <OpinionCardContentTime>
-                {dateConverter(
-                  new Date(child.timeLastEdited).toString().slice(4, -43)
-                )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{child.postId}</span>{" "}
-                (едитирано од модератор)
-              </OpinionCardContentTime>
-            )}
-
-            <div
-              style={{
-                display:
-                  !auth || (auth && loadedUser && user.id !== child.author.id)
-                    ? "block"
-                    : "none",
-              }}
-            >
-              <StyledFontAwesomeIcon
-                icon={solid("thumbs-up")}
-                right={50 + "px"}
-                color={
-                  auth && loadedUser && user
-                    ? child.votes.some(
-                        (e) => e.vote === "UPVOTE" && e.user.id === user.id
-                      )
-                      ? "green"
-                      : "darkgrey"
-                    : "darkgrey"
-                }
-                onClick={() => handleLike(child)}
-              />
-
-              <VoteCount right={50 + "px"}>
-                {child.votes.filter((v) => v.vote === "UPVOTE").length}
-              </VoteCount>
-
-              <StyledFontAwesomeIcon
-                icon={solid("thumbs-down")}
-                right={10 + "px"}
-                color={
-                  auth && loadedUser && user
-                    ? child.votes.some(
-                        (e) => e.vote === "DOWNVOTE" && e.user.id === user.id
-                      )
-                      ? "indianred"
-                      : "darkgrey"
-                    : "darkgrey"
-                }
-                onClick={() => handleDislike(child)}
-              />
-
-              <VoteCount right={10 + "px"}>
-                {child.votes.filter((v) => v.vote === "DOWNVOTE").length}
-              </VoteCount>
-
-              <StyledFontAwesomeIcon
-                icon={solid("reply")}
-                right={90 + "px"}
-                color="darkgrey"
-                onClick={() => handleReply(child)}
-              />
-
-              <StyledFontAwesomeIcon
-                  icon={solid("flag")}
-                  right={130 + "px"}
-                  color="darkgrey"
-                  onClick={() => handleReport(child)}
-              />
-            </div>
-          </OpinionReplyCardContent>
-
-          {child.children.map((childOfChild) =>
-            displayChildPosts(
-              childOfChild,
-              child.author.username,
-              replyIndent + 30
-            )
-          )}
-        </OpinionReplyCard>
-      </div>
-    );
-  }
-
-  return loadedThread && thread.length !== 0 ? (
-    <>
-      <CurrentPageNav>
-        &#187;{" "}
-        <a
-          href={
-            "/university/" +
-            thread.targetSubject.studyProgramme.faculty.university.universityId
-          }
-        >
-          {
-            thread.targetSubject.studyProgramme.faculty.university
-              .universityName
-          }
-        </a>{" "}
-        &#187;{" "}
-        <a
-          href={
-            "/faculty/" + thread.targetSubject.studyProgramme.faculty.facultyId
-          }
-        >
-          {thread.targetSubject.studyProgramme.faculty.facultyName}
-        </a>{" "}
-        &#187;{" "}
-        <a href={"/subject/" + thread.targetSubject.subjectId}>
-          {thread.targetSubject.subjectName}
-        </a>
-      </CurrentPageNav>
-      <div style={{ height: "20px", marginBottom: "50px", marginTop: "50px" }}>
-        <h3 style={{ float: "left" }}>{thread.title} <span style={{opacity:"50%", fontSize:"16px"}}>#{thread.postId}</span></h3>
-        {auth && (
-          <AddOpinionButton onClick={handleAddOpinionButtonClick}>
-            Реплицирај
-          </AddOpinionButton>
-        )}
-      </div>
-      <Modal display={postModalDisplay}>
-        <ModalContent>
-          <ModalHeader>
-            <ModalClose onClick={handleModalCloseClick}>&times;</ModalClose>
-            <h3 style={{ marginTop: "5px" }}>
-              Реплика на темата {thread.title}
-            </h3>
-          </ModalHeader>
-          <form onSubmit={handlePostSubmit}>
-            <ModalBody>
-              <label htmlFor="content">
-                <b>Содржина</b>:
-                <ModalTextarea
-                  id="content"
-                  rows="8"
-                  cols="100"
-                  value={postContent}
-                  onChange={handleContentChange}
-                  spellCheck={false}
-                />
-              </label>
-            </ModalBody>
-            <p style={{ color: "red", marginLeft: "15px", marginTop: "10px" }}>
-              {errorMessage}
-            </p>
-            <ModalFooter type="submit">ОБЈАВИ</ModalFooter>
-          </form>
-        </ModalContent>
-      </Modal>
-      <OpinionCard>
-        <OpinionCardContent>
-          <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-            <a href={"/user/" + thread.author.id}>{thread.author.username}</a>{" "}
-            напишал
-          </p>
-          <p style={{ marginBottom: "10px", maxWidth: "90%" }}>
-            {thread.content}
-          </p>
-          {new Date(thread.timePosted).setMilliseconds(0) === new Date(thread.timeLastEdited).setMilliseconds(0) ? (
-            <OpinionCardContentTime>
-              {dateConverter(
-                new Date(thread.timePosted).toString().slice(4, -43)
-              )} <span style={{fontStyle:"normal",color:"blue"}}>#{thread.postId}</span>
-            </OpinionCardContentTime>
-          ) : (
-            <OpinionCardContentTime>
-              {dateConverter(
-                new Date(thread.timeLastEdited).toString().slice(4, -43)
-              )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{thread.postId}</span>{" "}
-              (едитирано од модератор)
-            </OpinionCardContentTime>
-          )}
-          <div
-            style={{
-              display:
-                !auth || (auth && loadedUser && user.id !== thread.author.id)
-                  ? "block"
-                  : "none",
-            }}
-          >
-            <StyledFontAwesomeIcon
-                icon={solid("flag")}
-                right={90 + "px"}
-                color="darkgrey"
-                onClick={() => handleReport(thread)}
-            />
-            <StyledFontAwesomeIcon
-              icon={solid("thumbs-up")}
-              right={50 + "px"}
-              color={
-                auth && loadedUser && user
-                  ? thread.votes.some(
-                      (e) => e.vote === "UPVOTE" && e.user.id === user.id
-                    )
-                    ? "green"
-                    : "darkgrey"
-                  : "darkgrey"
-              }
-              onClick={() => handleLike(thread)}
-            />
-
-            <VoteCount right={50 + "px"}>
-              {thread.votes.filter((v) => v.vote === "UPVOTE").length}
-            </VoteCount>
-
-            <StyledFontAwesomeIcon
-              icon={solid("thumbs-down")}
-              right={10 + "px"}
-              color={
-                auth && loadedUser && user
-                  ? thread.votes.some(
-                      (e) => e.vote === "DOWNVOTE" && e.user.id === user.id
-                    )
-                    ? "indianred"
-                    : "darkgrey"
-                  : "darkgrey"
-              }
-              onClick={() => handleDislike(thread)}
-            />
-
-            <VoteCount right={10 + "px"}>
-              {thread.votes.filter((v) => v.vote === "DOWNVOTE").length}
-            </VoteCount>
-          </div>
-        </OpinionCardContent>
-      </OpinionCard>
-      {thread.children.map((directChild) => {
-        return (
-          <OpinionCard key={directChild.postId}>
-            <OpinionCardContent>
-              <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-                <a href={"/user/" + directChild.author.id}>
-                  {directChild.author.username}
-                </a>{" "}
-                напишал
-              </p>
-              <p style={{ marginBottom: "10px", maxWidth: "90%" }}>
-                {directChild.content}
-              </p>
-              {new Date(directChild.timePosted).setMilliseconds(0) === new Date(directChild.timeLastEdited).setMilliseconds(0) ? (
-                <OpinionCardContentTime>
-                  {dateConverter(
-                    new Date(directChild.timePosted).toString().slice(4, -43)
-                  )} <span style={{fontStyle:"normal",color:"blue"}}>#{directChild.postId}</span>
-                </OpinionCardContentTime>
-              ) : (
-                <OpinionCardContentTime>
-                  {dateConverter(
-                    new Date(directChild.timeLastEdited)
-                      .toString()
-                      .slice(4, -43)
-                  )}{" "} <span style={{fontStyle:"normal",color:"blue"}}>#{directChild.postId}</span>{" "}
-                  (едитирано од модератор)
-                </OpinionCardContentTime>
-              )}
-              <div
-                style={{
-                  display:
-                    !auth ||
-                    (auth && loadedUser && user.id !== directChild.author.id)
-                      ? "block"
-                      : "none",
-                }}
-              >
-                <StyledFontAwesomeIcon
-                  icon={solid("thumbs-up")}
-                  right={50 + "px"}
-                  color={
-                    auth && loadedUser && user
-                      ? directChild.votes.some(
-                          (e) => e.vote === "UPVOTE" && e.user.id === user.id
-                        )
-                        ? "green"
-                        : "darkgrey"
-                      : "darkgrey"
-                  }
-                  onClick={() => handleLike(directChild)}
-                />
-
-                <VoteCount right={50 + "px"}>
-                  {directChild.votes.filter((v) => v.vote === "UPVOTE").length}
-                </VoteCount>
-
-                <StyledFontAwesomeIcon
-                  icon={solid("thumbs-down")}
-                  right={10 + "px"}
-                  color={
-                    auth && loadedUser && user
-                      ? directChild.votes.some(
-                          (e) => e.vote === "DOWNVOTE" && e.user.id === user.id
-                        )
-                        ? "indianred"
-                        : "darkgrey"
-                      : "darkgrey"
-                  }
-                  onClick={() => handleDislike(directChild)}
-                />
-
-                <VoteCount right={10 + "px"}>
-                  {
-                    directChild.votes.filter((v) => v.vote === "DOWNVOTE")
-                      .length
-                  }
-                </VoteCount>
-
-                <StyledFontAwesomeIcon
-                  icon={solid("reply")}
-                  right={90 + "px"}
-                  color="darkgrey"
-                  onClick={() => handleReply(directChild)}
-                />
-
-                <StyledFontAwesomeIcon
-                    icon={solid("flag")}
-                    right={130 + "px"}
-                    color="darkgrey"
-                    onClick={() => handleReport(directChild)}
-                />
-              </div>
-            </OpinionCardContent>
-            {directChild.children.map((child) =>
-              displayChildPosts(child, directChild.author.username, 30)
-            )}
-          </OpinionCard>
-        );
-      })}
-      {postForReplyModal && (
-        <Modal display={replyModalDisplay}>
-          <ModalContent>
-            <ModalHeader>
-              <ModalClose onClick={handleModalCloseClick}>&times;</ModalClose>
-              <h3 style={{ marginTop: "5px" }}>
-                Реплика на {postForReplyModal.author.username}
-              </h3>
-            </ModalHeader>
-            <form onSubmit={(e) => handleReplySubmit(e, postForReplyModal.postId)}>
-              <ModalBody>
-                <label htmlFor="content">
-                  <b>Содржина</b>:
-                  <ModalTextarea
-                    id="content"
-                    rows="8"
-                    cols="100"
-                    value={replyContent}
-                    onChange={handleReplyContentChange}
-                  />
-                </label>
-              </ModalBody>
-              <p
-                style={{ color: "red", marginLeft: "15px", marginTop: "10px" }}
-              >
-                {errorMessage}
-              </p>
-              <ModalFooter type="submit">РЕПЛИЦИРАЈ</ModalFooter>
-            </form>
-          </ModalContent>
-        </Modal>
-      )}
-      {postForReportModal && (
-          <Modal display={reportModalDisplay}>
-            <ModalContent>
-              <ModalHeader>
-                <ModalClose onClick={handleModalCloseClick}>&times;</ModalClose>
-                <h3 style={{ marginTop: "5px" }}>
-                  Пријава за мислење #{postForReportModal.postId}
-                </h3>
-              </ModalHeader>
-              <form onSubmit={(e) => handleReportSubmit(e, postForReportModal.postId)}>
-                <ModalBody>
-                  <label htmlFor="content">
-                    <b>Наведете причина</b>:
-                    <ModalTextarea
-                        id="content"
-                        rows="8"
-                        cols="100"
-                        value={reportContent}
-                        onChange={handleReportContentChange}
-                    />
-                  </label>
-                </ModalBody>
-                <p
-                    style={{ color: "red", marginLeft: "15px", marginTop: "10px" }}
-                >
-                  {errorMessage}
-                </p>
-                <ModalFooter type="submit">ПРИЈАВИ</ModalFooter>
-              </form>
-            </ModalContent>
-          </Modal>
-      )}
-    </>
-  ) : !fetchError && !loadedThread ? (
-    <div>
-      <LoadingSpinner style={{ marginTop: "140px" }}/>
-      <Outlet />
-    </div>
-  ) : (
-    <div style={{ marginTop: "140px" }}>
-      <h1 style={{ textAlign: "center" }}>Страницата не е пронајдена.</h1>
-    </div>
-  );
-};
-
-export default Topic;
Index: reactapp/src/Pages/University.js
===================================================================
--- reactapp/src/Pages/University.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,115 +1,0 @@
-import React, { useState, useEffect } from "react";
-import { useParams, Outlet } from "react-router-dom";
-import JSOG from "jsog";
-import {
-  ProfessorCard,
-  ProfessorCardName,
-  ProfessorCardSeparator,
-  ProfessorCardDetails,
-} from "../Components/Styled/ProfessorCard.style";
-import {
-  EntityUl,
-  EntityLi,
-  EntityParam,
-} from "../Components/Styled/EntityList.style";
-import { CurrentPageNav } from "../Components/Styled/Main.style";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
-
-const University = () => {
-  let params = useParams();
-
-  const [faculties, setFaculties] = useState(null);
-  const [loadedFaculties, setLoadedFaculties] = useState(false);
-
-  const [counts, setCounts] = useState(null);
-  const [loadedCounts, setLoadedCounts] = useState(false);
-
-  const [fetchError, setFetchError] = useState(false);
-
-  useEffect(() => {
-        Promise.all([fetch(`http://192.168.1.108:8080/public/faculties?universityId=${params.universityId}`),
-        fetch(`http://192.168.1.108:8080/public/university/${params.universityId}/sectionAndPostCount`)])
-            .then(([resFaculties, counts]) => Promise.all([resFaculties.json(), counts.json()]))
-            .then(([dataFaculties, dataCounts]) => {
-                let cyclicGraph1 = dataFaculties;
-                let jsogStructure1 = JSOG.encode(cyclicGraph1);
-                cyclicGraph1 = JSOG.decode(jsogStructure1);
-                setFaculties(cyclicGraph1);
-                setLoadedFaculties(true);
-
-                let cyclicGraph2 = dataCounts;
-                let jsogStructure2 = JSOG.encode(cyclicGraph2);
-                cyclicGraph2 = JSOG.decode(jsogStructure2);
-                setCounts(cyclicGraph2);
-                setLoadedCounts(true);
-            })
-
-  }, []);
-
-  return loadedFaculties && !fetchError && faculties.length !== 0 ? (
-    <>
-      <CurrentPageNav>
-        &#187; <a href="#">{faculties[0].university.universityName}</a>
-      </CurrentPageNav>
-      <ProfessorCard>
-        <ProfessorCardName>
-          {faculties[0].university.universityName}
-        </ProfessorCardName>
-        <ProfessorCardSeparator />
-        <ProfessorCardDetails fontSize="20px">
-          {faculties[0].university.city.cityName}
-        </ProfessorCardDetails>
-      </ProfessorCard>
-      <div key={params.universityId}>
-        {faculties.map((faculty, idx) => {
-          let totalPosts = parseInt(counts[idx].split(",")[2]);
-          let totalSections = parseInt(counts[idx].split(",")[1]);
-          console.log(counts)
-          return (
-            <EntityUl key={faculty.facultyId}>
-              <EntityLi bgcolor="cornsilk">
-                <a href={"/faculty/" + faculty.facultyId}>
-                  {faculty.facultyName}
-                </a>
-                <EntityParam right="30px">
-                  {totalSections}{" "}
-                  {totalSections !== 1 ? (
-                    <span style={{ fontWeight: "normal" }}>секции,</span>
-                  ) : (
-                    <span style={{ fontWeight: "normal" }}>секција</span>
-                  )}
-                  <span style={{ opacity: totalPosts === 0 ? "0.5" : "1" }}>
-                    {totalPosts}
-                  </span>{" "}
-                  {totalPosts !== 1 ? (
-                    <span
-                      style={{
-                        fontWeight: "normal",
-                        opacity: totalPosts === 0 ? "0.5" : "1",
-                      }}
-                    >
-                      мислења
-                    </span>
-                  ) : (
-                    <span style={{ fontWeight: "normal" }}>мислење</span>
-                  )}
-                </EntityParam>
-              </EntityLi>
-            </EntityUl>
-          );
-        })}
-      </div>
-    </>
-  ) : !fetchError && !loadedFaculties ? (
-    <div>
-      <LoadingSpinner style={{ marginTop: "140px" }}/>
-      <Outlet />
-    </div>
-  ) : (
-    <div style={{ marginTop: "140px" }}>
-      <h1 style={{ textAlign: "center" }}>Страницата не е пронајдена.</h1>
-    </div>
-  );
-};
-
-export default University;
Index: reactapp/src/Pages/UserDashboard.js
===================================================================
--- reactapp/src/Pages/UserDashboard.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/Pages/UserDashboard.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -1,10 +1,8 @@
-/* eslint-disable no-unused-vars */
-// noinspection JSUnresolvedVariable,ES6ConvertVarToLetConst,JSUnresolvedFunction,SpellCheckingInspection,JSUnusedLocalSymbols
-
-import React, { useEffect, useState, useContext } from "react";
+import React, { useEffect } from "react";
 import {
   OpinionCard,
   OpinionCardContent,
   OpinionCardContentTime,
+  OpinionCardContentTitle,
 } from "../Components/Styled/OpinionCard.style";
 import {
@@ -13,310 +11,28 @@
 } from "../Components/Styled/UserDetails.style";
 import { dateConverter } from "../Util/dateConverter";
-import axios from "../api/axios";
-import JSOG from "jsog";
-import AuthApi from "../api/AuthApi";
-import {EntityLi, EntityTypeSelector, EntityUl} from "../Components/Styled/EntityList.style";
-import {
-  AddOpinionButton,
-  Modal,
-  ModalBody,
-  ModalClose,
-  ModalContent, ModalFooter,
-  ModalHeader, ModalTextarea,
-    ModalInput
-} from "../Components/Styled/Modal.style";
-import LoadingSpinner from "../Components/Styled/LoadingSpinner.style";
-import {findParentThread} from "../Util/findParentThread";
 
-function UserDashboard() {
-  const { auth, setAuth } = useContext(AuthApi);
+function UserDashboard({ user, userLoaded }) {
+  useEffect(() => {
+    const timer = setTimeout(() => {
+      if (user === null) window.location.reload(false);
+    }, 3000);
+    return () => clearTimeout(timer);
+  }, []);
 
-  const [user, setUser] = useState(null);
-  const [loadedUser, setLoadedUser] = useState(false);
-  const [authoredPosts, setAuthoredPosts] = useState(null);
-  const [loadedAuthoredPosts, setLoadedAuthoredPosts] = useState(false);
-
-  const [fetchError, setFetchError] = useState(false);
-
-  const [postReports, setPostReports] = useState(null);
-  const [loadedPostReports, setLoadedPostReports] = useState(false);
-
-  const [reportModalDisplay, setReportModalDisplay] = useState("none");
-  const [reportForModal, setReportForModal] = useState(null);
-
-  const [actionType, setActionType] = useState(0);
-
-  const [newPostContent, setNewPostContent] = useState("");
-  const [newOpinionTargetProfessorId, setNewOpinionTargetProfessorId] = useState("");
-  const [newParentPostId, setNewParentPostId] = useState("-1");
-
-  const [newThreadTitle, setNewThreadTitle] = useState("");
-  const [newParentThreadId,setNewParentThreadId] = useState("-1");
-  const [newTargetSubjectId, setNewTargetSubjectId] = useState("");
-
-
-  const [markResolved, setMarkResolved] = useState(false);
-
-  const [errMsg, setErrMsg] = useState("");
-
-  const handleModalCloseClick = () => {
-    setReportForModal(null);
-    setReportModalDisplay("none");
-    document.body.style.overflowY = "auto";
-  };
-
-  const handleViewReportButtonClick = (e,report) => {
-    e.preventDefault();
-    setReportForModal(report);
-  }
-
-  useEffect(() => {
-    if(reportForModal!==null) {
-      if (reportForModal.post !== null) {
-        setNewPostContent(reportForModal.post.content);
-        if(reportForModal.post.title !== null) setNewThreadTitle(reportForModal.post.title);
-        if(reportForModal.post.targetProfessor !== undefined) setNewOpinionTargetProfessorId(reportForModal.post.targetProfessor.professorId); //prvicnoto
-        if(reportForModal.post.targetProfessor === undefined) setNewTargetSubjectId(reportForModal.post.targetSubject.subjectId); //prvicnoto
-      }
-      setReportModalDisplay("block");
-      document.body.style.overflowY = "hidden";
-    }
-  }, [reportForModal]);
-
-  const [newOpinionTargetProfessor, setNewOpinionTargetProfessor] = useState(null);
-  const [loadedNewProfessor,setLoadedNewProfessor] = useState(false);
-  const [newProfessorRelatedOpinions, setNewProfessorRelatedOpinions] = useState(null);
-  const [loadedNewProfessorRelatedOpinions, setLoadedNewProfessorRelatedOpinions] = useState(false);
-  const [loadingProf, setLoadingProf] = useState(false);
-
-  const handleNewTargetProfessorChange = async (e) => {
-    setLoadingProf(true);
-    e.preventDefault();
-    if (newOpinionTargetProfessorId!=="") {
-        try {
-          Promise.all([fetch(`http://192.168.1.108:8080/public/professor/${newOpinionTargetProfessorId}`),
-            fetch(`http://192.168.1.108:8080/public/professor/${newOpinionTargetProfessorId}/relatedOpinions`)])
-              .then(([resNewOpinionTargetProfessor, resNewProfessorRelatedOpinions]) => Promise.all([resNewOpinionTargetProfessor.json(), resNewProfessorRelatedOpinions.json()]))
-              .then(([dataNewOpinionTargetProfessor, dataNewProfessorRelatedOpinions]) => {
-                let cyclicGraph1 = dataNewOpinionTargetProfessor;
-                var jsogStructure1 = JSOG.encode(cyclicGraph1);
-                cyclicGraph1 = JSOG.decode(jsogStructure1);
-                setNewOpinionTargetProfessor(cyclicGraph1);
-                setLoadedNewProfessor(true);
-
-                let cyclicGraph2 = dataNewProfessorRelatedOpinions;
-                var jsogStructure2 = JSOG.encode(cyclicGraph2);
-                cyclicGraph2 = JSOG.decode(jsogStructure2);
-                setNewProfessorRelatedOpinions(cyclicGraph2);
-                setLoadedNewProfessorRelatedOpinions(true);
-
-                setLoadingProf(false);
-              })
-        } catch (error) {
-          setFetchError(true);
-        }
-    }
-  }
-
-  const [newTargetSubject, setNewTargetSubject] = useState(null);
-  const [loadedNewSubject, setLoadedNewSubject] = useState(false);
-  const [newTargetSubjectThreads, setNewTargetSubjectThreads] = useState(null);
-  const [loadedNewSubjectThreads, setLoadedNewSubjectThreads] = useState(false);
-  const [loadingSubj, setLoadingSubj] = useState(false);
-
-  const handleNewTargetSubjectChange = async (e) => {
-    e.preventDefault();
-    setLoadingSubj(true);
-    if (newTargetSubjectId!=="") {
-      try {
-        Promise.all([fetch(`http://192.168.1.108:8080/public/subject/${newTargetSubjectId}`),
-        fetch(`http://192.168.1.108:8080/public/subject/${newTargetSubjectId}/threads`)])
-            .then(([resNewTargetSubject, resNewTargetSubjectThreads]) => Promise.all([resNewTargetSubject.json(), resNewTargetSubjectThreads.json()]))
-            .then(([dataNewTargetSubject, dataNewTargetSubjectThreads]) => {
-              let cyclicGraph1 = dataNewTargetSubject;
-              var jsogStructure1 = JSOG.encode(cyclicGraph1);
-              cyclicGraph1 = JSOG.decode(jsogStructure1);
-              setNewTargetSubject(cyclicGraph1);
-              setLoadedNewSubject(true);
-
-              let cyclicGraph2 = dataNewTargetSubjectThreads;
-              var jsogStructure2 = JSOG.encode(cyclicGraph2);
-              cyclicGraph2 = JSOG.decode(jsogStructure2);
-              setNewTargetSubjectThreads(cyclicGraph2);
-              setLoadedNewSubjectThreads(true);
-
-              setLoadingSubj(false);
-            })
-        } catch (error) {
-            setFetchError(true);
-        }
-    }
-  }
-
-  useEffect(() => {
-    const fetchUser = () => {
-      try {
-        if(!loadedUser) {
-          Promise.all([axios.get(`http://192.168.1.108:8080/secure/currentUser`, {withCredentials:true}),
-            axios.get(`http://192.168.1.108:8080/secure/currentUser/posts`, {withCredentials:true})])
-              .then(([resUser, resAuthoredPosts]) => Promise.all([resUser.data, resAuthoredPosts.data]))
-              .then(([dataUser, dataAuthoredPosts]) => {
-                let cyclicGraph1 = dataUser;
-                let jsogStructure1 = JSOG.encode(cyclicGraph1);
-                cyclicGraph1 = JSOG.decode(jsogStructure1);
-                setUser(cyclicGraph1);
-                setLoadedUser(true);
-
-                let cyclicGraph2 = dataAuthoredPosts;
-                let jsogStructure2 = JSOG.encode(cyclicGraph2);
-                cyclicGraph2 = JSOG.decode(jsogStructure2);
-                setAuthoredPosts(cyclicGraph2);
-                setLoadedAuthoredPosts(true);
-              })
-        }
-        if(user.userRole==='MODERATOR') fetchPostReports();
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    const fetchPostReports = async () => {
-      try {
-        const response = await axios.get(`http://192.168.1.108:8080/secure/getAllPostReports`, {withCredentials: true});
-        var cyclicGraph = await response.data;
-        var jsogStructure = JSOG.encode(cyclicGraph);
-        cyclicGraph = JSOG.decode(jsogStructure);
-        setPostReports(cyclicGraph);
-        setLoadedPostReports(true);
-      } catch (error) {
-        setFetchError(true);
-      }
-    };
-
-    if (auth) fetchUser();
-
-  }, [user]);
-
-  const handleEdit = async (e) => {
-    e.preventDefault();
-    try {
-      if(reportForModal.post !== null && reportForModal.post.targetProfessor !== undefined) {
-        await axios(`http://192.168.1.108:8080/secure/updateOpinion/${reportForModal.post.postId}`,
-            {
-              method: "put",
-              data: {
-                newContent: newPostContent,
-                newTargetProfessorId: reportForModal.post.targetProfessor.professorId,
-                newParentPostId: reportForModal.post.parent !== null ? reportForModal.post.parent.postId : "-1"
-              },
-              withCredentials: true,
-            })
-        await axios(`http://192.168.1.108:8080/secure/markReportResolved/${reportForModal.postReportId}/${markResolved ? `resolve` : `open`}`,{
-          method: "get",
-          withCredentials: true
-        })
-      } else if(reportForModal.post !== null && reportForModal.post.targetProfessor === undefined) {
-        await axios(`http://192.168.1.108:8080/secure/updateThread/${reportForModal.post.postId}`,
-            {
-              method: "put",
-              data: {
-                newTitle: newThreadTitle,
-                newContent: newPostContent,
-                newTargetSubjectId: reportForModal.post.targetSubject.subjectId,
-                newParentThreadId: reportForModal.post.parent !== null ? reportForModal.post.parent.postId : "-1"
-              },
-              withCredentials: true,
-            })
-      }
-      await axios(`http://192.168.1.108:8080/secure/markReportResolved/${reportForModal.postReportId}/${markResolved ? `resolve` : `open`}`,{
-          method: "get",
-          withCredentials: true
-      })
-    } catch (error) {
-      setFetchError(true);
-    }
-    window.location.reload();
-  }
-
-  const handleRelocate = async (e) => {
-    e.preventDefault();
-    try {
-      if(reportForModal.post !== null && reportForModal.post.targetProfessor !== undefined) {
-        var response = await axios(`http://192.168.1.108:8080/secure/updateOpinion/${reportForModal.post.postId}`,
-            {
-              method: "put",
-              data: {
-                newContent: reportForModal.post.content,
-                newTargetProfessorId: newOpinionTargetProfessorId,
-                newParentPostId: newParentPostId==="Постави како самостојно мислење" ? "-1" : newParentPostId //:)
-              },
-              withCredentials: true,
-            })
-        await axios(`http://192.168.1.108:8080/secure/markReportResolved/${reportForModal.postReportId}/${markResolved ? `resolve` : `open`}`,{
-          method: "get",
-          withCredentials: true
-        })
-      } else if(reportForModal.post !== null && reportForModal.post.targetProfessor === undefined) {
-        var response = await axios(`http://192.168.1.108:8080/secure/updateThread/${reportForModal.post.postId}`,
-            {
-              method: "put",
-              data: {
-                newTitle: newThreadTitle,
-                newContent: reportForModal.post.content,
-                newTargetSubjectId: newTargetSubjectId,
-                newParentThreadId: newParentThreadId==="Постави како самостојно мислење (нова тема)" ? "-1" : newParentThreadId //:)
-              },
-              withCredentials: true,
-            })
-      }
-      await axios(`http://192.168.1.108:8080/secure/markReportResolved/${reportForModal.postReportId}/${markResolved ? `resolve` : `open`}`,{
-        method: "get",
-        withCredentials: true
-      })
-    } catch (error) {
-      setFetchError(true);
-    }
-    setErrMsg(response.data);
-    if (response.data==="") window.location.reload();
-  }
-
-  const handleDelete = async (e) => {
-    e.preventDefault();
-    try {
-      if(reportForModal.post !== null && reportForModal.post.targetProfessor !== undefined) {
-        await axios(`http://192.168.1.108:8080/secure/deleteOpinion/${reportForModal.post.postId}`,
-            {
-              method: "delete",
-              withCredentials: true,
-            })
-        window.location.reload();
-      } else if(reportForModal.post !== null && reportForModal.post.targetProfessor === undefined) {
-        await axios(`http://192.168.1.108:8080/secure/deleteThread/${reportForModal.post.postId}`,
-            {
-              method: "delete",
-              withCredentials: true,
-            })
-      }
-    } catch (error) {
-      setFetchError(true);
-    }
-    window.location.reload();
-  }
-
-  const handleMarkResolved = () => {
-    if (actionType !== 1) setMarkResolved(!markResolved);
-  }
-
-  return loadedUser ? (
+  return userLoaded ? (
     <>
       <h3>Кориснички податоци:</h3>
       <UserDetailsCard>
-        {user.fullName && (
-          <UserDetailsCardContent>
-            <b>Име:</b> {user.fullName}{" "}
-          </UserDetailsCardContent>
-        )}
+        <UserDetailsCardContent>
+          <b>Име:</b> {user.fullName}{" "}
+          <i style={{ fontSize: 14, color: "#0066cc" }}>
+            (<u>промени</u>)
+          </i>
+        </UserDetailsCardContent>
         <UserDetailsCardContent>
           <b>Корисничко име:</b> {user.username}{" "}
+          <i style={{ fontSize: 14, color: "#0066cc" }}>
+            (<u>промени</u>)
+          </i>
         </UserDetailsCardContent>
         <UserDetailsCardContent>
@@ -324,59 +40,29 @@
         </UserDetailsCardContent>
         <UserDetailsCardContent>
-          <b>Карма:</b>{" "}
-          <span style={{ color: user.karma < 0 ? "indianred" : "green" }}>
-            {user.karma}
-          </span>
+          <b>Карма:</b> {user.karma}
         </UserDetailsCardContent>
       </UserDetailsCard>
-      {loadedPostReports ? postReports.length > 0 ? (
-          <h3 style={{ marginBottom: "10px" }}>Пријави за мислења:</h3>
+      {user.authoredPosts.length > 0 ? (
+        <h3 style={{ marginBottom: "10px" }}>Ваши мислења:</h3>
       ) : (
-          <h3>Нема пријавени мислења</h3>
-      ) : loadedUser && user.userRole==='MODERATOR' ? <LoadingSpinner/> : ""}
-      <EntityUl style={{marginTop:"25px"}}>
-      {loadedPostReports && postReports.map((postReport) => {
-        return <EntityLi bgcolor="cornsilk" key={postReport.postReportId} style={{padding:"15px"}}>
-          <p style={{color: postReport.resolved ? "grey" : "black"}}><span style={{fontSize:"14px", fontStyle:"italic", fontWeight:"normal"}}>{dateConverter(
-              new Date(postReport.time).toString().slice(4, -43)
-          )}</span><br/>{postReport.description.substring(0,45 )}{postReport.description.length >= 45 ? ("...") : ("")} {postReport.resolved ? <span style={{fontStyle:"italic"}}>(разрешено)</span> : ""}
-            </p>
-          <AddOpinionButton onClick={(e)=>handleViewReportButtonClick(e,postReport)} style={{height:"30px", padding:"5px", fontSize:"14px", position:"absolute", top:"30%", right:"20px" }}>Разгледај</AddOpinionButton>
-        </EntityLi>;
-      })}
-      </EntityUl>
-      {authoredPosts.length > 0 ? (
-        <h3 style={{ marginBottom: "10px", marginTop:"30px" }}>Ваши мислења:</h3>
-      ) : (
-        <h3 style={{ marginBottom: "10px" }}>Немате објавени мислења</h3>
+        <h3>Немате објавени мислења</h3>
       )}
-      {authoredPosts.map((post) => {
+      {user.authoredPosts.map((post) => {
         return (
           <div key={post.postId}>
             <OpinionCard>
               <OpinionCardContent>
-                <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-                  во дискусија за{" "}
-                  {post.targetProfessor !== undefined ? (
-                    <a href={"/professor/" + post.targetProfessor.professorId}>
-                      {post.targetProfessor.professorName}
-                    </a>
-                  ) : (
-                    <a
-                      href={
-                        post.parent === null
-                          ? "/topic/" + post.postId
-                          : "/topic/" + findParentThread(post).postId
-                      }
-                    >
-                      {post.targetSubject.subjectName}
-                    </a>
-                  )}
+                <p>
+                  Во дискусија за{" "}
+                  <a href={"/professor/" + post.targetProfessor.professorId}>
+                    {post.targetProfessor.professorName}
+                  </a>
                 </p>
-                <p style={{ marginBottom: "10px" }}>{post.content}</p>
+                <OpinionCardContentTitle>{post.title}</OpinionCardContentTitle>
+                <p>{post.content}</p>
                 <OpinionCardContentTime>
                   {dateConverter(
                     new Date(post.timePosted).toString().slice(4, -43)
-                  )} <span style={{fontStyle:"normal",color:"blue"}}>#{post.postId}</span>
+                  )}
                 </OpinionCardContentTime>
               </OpinionCardContent>
@@ -385,266 +71,7 @@
         );
       })}
-      {reportForModal && (
-          <Modal display={reportModalDisplay}>
-            <ModalContent>
-              <ModalHeader>
-                <ModalClose onClick={handleModalCloseClick}>&times;</ModalClose>
-                <h3 style={{ marginTop: "5px" }}>
-                  Преглед на пријава за мислење
-                </h3>
-              </ModalHeader>
-                <ModalBody>
-                  <p style={{fontWeight:"bold",marginBottom:"15px"}}>Пријавил: <span style={{fontWeight:"normal"}}>{reportForModal.user !== null ? <a href={"/user/"+reportForModal.user.id}>{reportForModal.user.username}</a> : "(избришан корисник)"}</span></p>
-                  <p style={{fontWeight:"bold",marginBottom:"15px"}}>Време на пријава: <span style={{fontWeight:"normal"}}>{dateConverter(
-                      new Date(reportForModal.time).toString().slice(4, -43)
-                  )}</span></p>
-                  <p style={{fontWeight:"bold",marginBottom:"15px"}}>Образложение: </p> <p style={{marginBottom:"15px"}}>{reportForModal.description}</p>
-                  <p style={{fontWeight:"bold", marginBottom:"15px"}}>Информации за пријавеното мислење:</p>
-                  {reportForModal.post !== null ?
-                    <OpinionCard>
-                      <OpinionCardContent>
-                        <p style={{fontStyle: "italic", marginBottom: "10px"}}>
-                          во дискусија за{" "}
-                          {reportForModal.post.targetProfessor !== undefined ? (
-                              <a href={"/professor/" + reportForModal.post.targetProfessor.professorId}>
-                                {reportForModal.post.targetProfessor.professorName}
-                              </a>
-                          ) : (
-                              <a
-                                  href={
-                                    reportForModal.post.parent === null
-                                        ? "/topic/" + reportForModal.post.postId
-                                        : "/topic/" + findParentThread(reportForModal.post).postId
-                                  }
-                              >
-                                {reportForModal.post.targetSubject.subjectName}
-                              </a>
-                          )}
-                        </p>
-                        {reportForModal.post.title === null ?
-                        <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-                          <a href={"/user/" + reportForModal.post.author.id}>
-                            {reportForModal.post.author.username}
-                          </a>{" "}
-                          напишал
-                        </p> :
-                            <p style={{ fontStyle: "italic", marginBottom: "10px" }}>
-                              <a href={"/user/" + reportForModal.post.author.id}>
-                                {reportForModal.post.author.username}
-                              </a>{" "}
-                              отворил тема со наслов <span style={{fontWeight:"bold"}}>{reportForModal.post.title}</span>
-                            </p>
-                        }
-                        <p style={{marginBottom: "10px"}}>{reportForModal.post.content}</p>
-                        <OpinionCardContentTime>
-                          {dateConverter(
-                              new Date(reportForModal.post.timePosted).toString().slice(4, -43)
-                          )} <span style={{fontStyle:"normal",color:"blue"}}>#{reportForModal.post.postId}</span>
-                        </OpinionCardContentTime>
-                      </OpinionCardContent>
-                    </OpinionCard>
-                  : "Пријавеното мислење или неговиот автор се избришани"}
-
-              {reportForModal.post !== null &&
-              <div style={{ display: "flex" }}>
-                {actionType===0 ? <EntityTypeSelector
-                    backgroundcolor="rgba(0, 102, 204, 1)"
-                    color="white"
-                    boxshadow="none"
-                    boxshadowhover="none"
-                    opacityhover="0.6"
-                    cursor="auto"
-                >
-                  Измени содржина или наслов
-                </EntityTypeSelector> : <EntityTypeSelector
-                    boxshadow="2px 2px 5px #aaaaaa"
-                    cursor="pointer"
-                    boxshadowhover="2px 2px 10px #aaaaaa"
-                    opacityhover="1"
-                    onClick={() => setActionType(0)}
-                >
-                  Измени содржина или наслов
-                </EntityTypeSelector>}
-                {actionType===1 ? <EntityTypeSelector
-                    backgroundcolor="rgba(0, 102, 204, 1)"
-                    color="white"
-                    boxshadow="none"
-                    boxshadowhover="none"
-                    opacityhover="0.6"
-                    cursor="auto"
-                >
-                  Избриши
-                </EntityTypeSelector> : <EntityTypeSelector
-                    boxshadow="2px 2px 5px #aaaaaa"
-                    cursor="pointer"
-                    boxshadowhover="2px 2px 10px #aaaaaa"
-                    opacityhover="1"
-                    onClick={() => {setActionType(1); setMarkResolved(true)}}
-                >
-                  Избриши
-                </EntityTypeSelector>}
-                {actionType===2 ? <EntityTypeSelector
-                    backgroundcolor="rgba(0, 102, 204, 1)"
-                    color="white"
-                    boxshadow="none"
-                    boxshadowhover="none"
-                    opacityhover="0.6"
-                    cursor="auto"
-                >
-                  Премести
-                </EntityTypeSelector> : <EntityTypeSelector
-                    boxshadow="2px 2px 5px #aaaaaa"
-                    cursor="pointer"
-                    boxshadowhover="2px 2px 10px #aaaaaa"
-                    opacityhover="1"
-                    onClick={() => setActionType(2)}
-                >
-                  Премести
-                </EntityTypeSelector>}
-              </div>}
-              {reportForModal.post !== null ?
-                  actionType === 0 ?
-              (<form onSubmit={e => handleEdit(e)}>
-                {reportForModal.post.title !== null &&
-                    <label>
-                  <b>Нов наслов на тема:</b>
-                  <ModalInput
-                      value={newThreadTitle}
-                      onChange={e => setNewThreadTitle(e.target.value)}
-                      id="title"
-                      spellCheck={false}
-                      style={{marginTop:"10px"}}
-                  />
-                </label>}
-                <label>
-                  <b>Нова содржина:</b>
-                  <ModalTextarea
-                      value={newPostContent}
-                      onChange={e => setNewPostContent(e.target.value)}
-                      id="content"
-                      rows="8"
-                      cols="100"
-                      spellCheck={false}
-                      style={{marginTop:"10px"}}
-                  />
-                </label>
-                <div style={{marginTop:"15px"}}>
-                <label>
-                  <input
-                      type="checkbox"
-                      onChange={handleMarkResolved}
-                  />
-                  <span style={{marginLeft:"10px", fontWeight:"bold"}}>Означи како разрешено</span>
-                </label>
-                </div>
-                <ModalFooter type="submit">ПОТВРДИ</ModalFooter>
-              </form>)
-                      : actionType === 1 ?
-                          (<form onSubmit={e => handleDelete(e)}>
-                            <p style={{color:"red", display:"flex", justifyContent:"space-around"}}>Избриши го мислењето? (оваа акција е иреверзибилна)</p>
-                            <div style={{marginTop:"15px"}}>
-                            <label>
-                              <input
-                                  type="checkbox"
-                                  checked={markResolved}
-                                  onChange={handleMarkResolved}
-                              />
-                              <span style={{marginLeft:"10px", fontWeight:"bold"}}>Означи како разрешено</span>
-                            </label>
-                            </div>
-                            <ModalFooter type="submit">ПОТВРДИ</ModalFooter>
-                          </form>)
-                          :
-                          (reportForModal.post.targetProfessor !== undefined ?
-                              (<form onSubmit={e => handleRelocate(e)}>
-                                <p style={{color:"black"}}>Внеси <span style={{fontWeight:"bold"}}>ID</span> на секцијата за дискусија (за <span style={{fontWeight:"bold"}}>професор</span>)
-                                    во која треба да биде преместено мислењето:</p>
-                                    <div style={{marginTop:"15px"}}>
-                                        <ModalInput
-                                            value={newOpinionTargetProfessorId}
-                                            onChange={e => {e.preventDefault();setNewOpinionTargetProfessorId(e.target.value)}}
-                                            id="newOpinionTargetProfessorId"
-                                            spellCheck={false}
-                                            style={{marginTop:"10px", marginBottom:"10px", width:"90px"}}
-                                        />
-                                        <button onClick={async (e) => {await handleNewTargetProfessorChange(e);}} style={{marginBottom:"10px", padding:"5px", fontFamily: "Roboto Mono, monospace"}}>Зачувај</button>
-                                        {newOpinionTargetProfessor!==null && !loadingProf ? <p style={{color:"black", marginBottom:"20px", opacity:"50%"}}>Мислењето ќе се премести во секцијата за професорот со <span style={{fontWeight:"bold"}}>ID=
-                                          {newOpinionTargetProfessor.professorId}</span> (<span style={{fontWeight:"bold"}}>{newOpinionTargetProfessor.professorName}</span>)</p> : loadingProf ? <LoadingSpinner style={{marginBottom:"15px", marginTop:"15px"}}/> : null}
-                                        {newOpinionTargetProfessor && <p style={{color:"black", marginBottom:"10px"}}>Постави како дете на мислење со ID:</p>}
-                                        {newOpinionTargetProfessor &&
-                                        <select value={newParentPostId} onChange={e => setNewParentPostId(e.target.value)} style={{width:"280px", display:"block", padding:"5px",marginBottom:"5px", fontFamily: "Roboto Mono, monospace"}}>
-                                          <option value="-1">Постави како самостојно мислење</option>
-                                          {newProfessorRelatedOpinions.filter((opinion)=>opinion.postId!==reportForModal.post.postId).map((opinion) => {
-                                            return <option key={opinion.postId} value={opinion.postId}>{opinion.postId}</option>})
-                                          }
-                                        </select>}
-                                        <br/>
-                                        <label>
-                                          <input
-                                              type="checkbox"
-                                              onChange={handleMarkResolved}
-                                          />
-                                          <span style={{marginLeft:"10px", fontWeight:"bold"}}>Означи како разрешено</span>
-                                        </label>
-                                    </div>
-                                {errMsg!=="" && <p style={{color:"red", display:"flex", justifyContent:"space-around"}}>{errMsg}</p>}
-                                    <ModalFooter type="submit">ПОТВРДИ</ModalFooter>
-                                  </form>) :
-                              //THREAD CASE
-                              (<form onSubmit={e => handleRelocate(e)}>
-                                <p style={{color:"black"}}>Внеси <span style={{fontWeight:"bold"}}>ID</span> на секцијата за дискусија (за <span style={{fontWeight:"bold"}}>предмет</span>)
-                                  во која треба да биде преместено мислењето:</p>
-                                <div style={{marginTop:"15px"}}>
-                                  <label>
-                                    <ModalInput
-                                        value={newTargetSubjectId}
-                                        onChange={e => {e.preventDefault();setNewTargetSubjectId(e.target.value)}}
-                                        id="newTargetSubjectId"
-                                        spellCheck={false}
-                                        style={{marginTop:"10px", marginBottom:"10px", width:"90px"}}
-                                    />
-                                    <button onClick={async (e) => {await handleNewTargetSubjectChange(e);}} style={{marginBottom:"10px", padding:"5px", fontFamily: "Roboto Mono, monospace"}}>Зачувај</button>
-                                    {newTargetSubject!==null && !loadingSubj ? <p style={{color:"black", marginBottom:"20px", opacity:"50%"}}>Мислењето ќе се премести во секцијата за предметот со <span style={{fontWeight:"bold"}}>ID=
-                                      {newTargetSubject.subjectId}</span> (<span style={{fontWeight:"bold"}}>{newTargetSubject.subjectName}</span>)</p> : loadingSubj ? <LoadingSpinner style={{marginBottom:"15px", marginTop:"15px"}}/> : null}
-                                    {newTargetSubject && <p style={{color:"black", marginBottom:"10px"}}>Постави како дете на мислење со ID:</p>}
-                                    {newTargetSubject &&
-                                        <select value={newParentThreadId} onChange={e => setNewParentThreadId(e.target.value)} style={{width:"370px", display:"block", padding:"5px",marginBottom:"5px", fontFamily: "Roboto Mono, monospace"}}>
-                                          <option value="-1">Постави како самостојно мислење (нова тема)</option>
-                                          {newTargetSubjectThreads.filter((thread)=>thread.postId!==reportForModal.post.postId).map((thread) => {
-                                            return <option key={thread.postId} value={thread.postId}>{thread.postId}</option>})
-                                          }
-                                        </select>}
-                                    {newParentThreadId==="-1" && loadedNewSubject &&
-                                        <>
-                                        <p style={{marginTop:"10px"}}>Наслов на нова тема:</p>
-                                      <ModalInput
-                                        value={newThreadTitle}
-                                        onChange={e => setNewThreadTitle(e.target.value)}
-                                        id="titleChangeRelocate"
-                                        spellCheck={false}
-                                        style={{marginTop:"10px"}}
-                                    />
-                                    </>}
-                                    <br/>
-                                    <input
-                                        type="checkbox"
-                                        defaultChecked={reportForModal.resolved}
-                                        onChange={handleMarkResolved}
-                                    />
-                                    <span style={{marginLeft:"10px", fontWeight:"bold"}}>Означи како разрешено</span>
-                                  </label>
-                                </div>
-                                {errMsg!=="" && <p style={{color:"red", display:"flex", justifyContent:"space-around"}}>{errMsg}</p>}
-                                <ModalFooter type="submit">ПОТВРДИ</ModalFooter>
-                              </form>))
-                  : null
-              }
-                </ModalBody>
-            </ModalContent>
-          </Modal>
-      )}
     </>
   ) : (
-      <LoadingSpinner/>
+    <>се вчитува...</>
   );
 }
Index: reactapp/src/Util/findParentThread.js
===================================================================
--- reactapp/src/Util/findParentThread.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,4 +1,0 @@
-export const findParentThread = (post) => {
-    if (post.parent === null) return post;
-    return findParentThread(post.parent);
-}
Index: reactapp/src/api/axios.js
===================================================================
--- reactapp/src/api/axios.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/api/axios.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -2,4 +2,4 @@
 
 export default axios.create({
-  baseURL: "http://192.168.1.108:8080",
+  baseURL: "http://192.168.0.17:8080",
 });
Index: reactapp/src/static/spinner.css
===================================================================
--- reactapp/src/static/spinner.css	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ 	(revision )
@@ -1,17 +1,0 @@
-@keyframes spinner {
-    0% {
-        transform: rotate(0deg);
-    }
-    100% {
-        transform: rotate(360deg);
-    }
-}
-.loading-spinner {
-    width: 30px;
-    height: 30px;
-    border: 6px solid #0066cc; /* lightblue */
-    border-top: 10px solid #fff; /* white */
-    opacity: 60%;
-    border-radius: 50%;
-    animation: spinner 1.5s linear infinite;
-}
