Ignore:
Timestamp:
08/19/22 19:10:24 (2 years ago)
Author:
unknown <mlviktor23@…>
Branches:
main
Children:
6221ab6
Parents:
6eba109
Message:

added current user/logout in header, display karma on user dashboard, started add post functionality in react

Location:
reactapp/src/Components
Files:
3 added
4 edited

Legend:

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

    r6eba109 r702ca77  
    22import AuthApi from "../api/AuthApi";
    33import Cookies from "js-cookie";
     4import { LogoutButton } from "./Styled/UserDetails.style";
     5import { Navigate } from "react-router-dom";
    46
    57function Logout() {
     
    1113  };
    1214
    13   return <button onClick={handleLogout}>Одјави се</button>;
     15  return <LogoutButton onClick={handleLogout}>Одјави се</LogoutButton>;
    1416}
    1517
  • reactapp/src/Components/Search.js

    r6eba109 r702ca77  
    1515
    1616  useEffect(() => {
    17     const url = `http://192.168.0.18:8080/public/professors/nameContains/${transliterate(
     17    const url = `http://192.168.0.17:8080/public/professors/nameContains/${transliterate(
    1818      query
    1919    )}`;
     
    2323        const response = await fetch(url);
    2424        var cyclicGraph = await response.json();
    25         var jsogStructure = JSOG.encode(cyclicGraph); // has { '@ref': 'ID' } links instead of cycles
     25        var jsogStructure = JSOG.encode(cyclicGraph);
    2626        cyclicGraph = JSOG.decode(jsogStructure);
    2727        setProfessors(cyclicGraph);
    28         //setLoaded(true);
    2928      } catch (error) {
    30         console.log("Fetching error occured", error);
     29        console.log("Fetching error", error);
    3130      }
    3231    };
  • reactapp/src/Components/Styled/Main.style.js

    r6eba109 r702ca77  
    66  margin: auto;
    77  margin-top: 20px;
     8  margin-bottom: 20px;
    89  padding-left: 50px;
    910  padding-right: 50px;
  • reactapp/src/Components/Styled/Search.style.js

    r6eba109 r702ca77  
    3030  &:hover {
    3131    background-color: papayawhip;
    32     border: 1px solid blue;
    33     text-decoration: underline 1px blue;
     32    border: 1px solid #0066cc;
     33    text-decoration: underline 1px #0066cc;
    3434  }
    3535  padding: 10px;
Note: See TracChangeset for help on using the changeset viewer.