Changes in / [d654c74:74b8c52]


Ignore:
Location:
reactapp
Files:
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • reactapp/package-lock.json

    rd654c74 r74b8c52  
    2424        "react-scripts": "5.0.1",
    2525        "styled-components": "^5.3.5",
    26         "transliteration": "^2.3.5",
    2726        "web-vitals": "^2.1.4"
    2827      }
     
    1570615705      }
    1570715706    },
    15708     "node_modules/transliteration": {
    15709       "version": "2.3.5",
    15710       "resolved": "https://registry.npmjs.org/transliteration/-/transliteration-2.3.5.tgz",
    15711       "integrity": "sha512-HAGI4Lq4Q9dZ3Utu2phaWgtm3vB6PkLUFqWAScg/UW+1eZ/Tg6Exo4oC0/3VUol/w4BlefLhUUSVBr/9/ZGQOw==",
    15712       "dependencies": {
    15713         "yargs": "^17.5.1"
    15714       },
    15715       "bin": {
    15716         "slugify": "dist/bin/slugify",
    15717         "transliterate": "dist/bin/transliterate"
    15718       },
    15719       "engines": {
    15720         "node": ">=6.0.0"
    15721       }
    15722     },
    15723     "node_modules/transliteration/node_modules/yargs": {
    15724       "version": "17.5.1",
    15725       "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz",
    15726       "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==",
    15727       "dependencies": {
    15728         "cliui": "^7.0.2",
    15729         "escalade": "^3.1.1",
    15730         "get-caller-file": "^2.0.5",
    15731         "require-directory": "^2.1.1",
    15732         "string-width": "^4.2.3",
    15733         "y18n": "^5.0.5",
    15734         "yargs-parser": "^21.0.0"
    15735       },
    15736       "engines": {
    15737         "node": ">=12"
    15738       }
    15739     },
    15740     "node_modules/transliteration/node_modules/yargs-parser": {
    15741       "version": "21.0.1",
    15742       "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz",
    15743       "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==",
    15744       "engines": {
    15745         "node": ">=12"
    15746       }
    15747     },
    1574815707    "node_modules/tryer": {
    1574915708      "version": "1.0.1",
     
    2806228021      }
    2806328022    },
    28064     "transliteration": {
    28065       "version": "2.3.5",
    28066       "resolved": "https://registry.npmjs.org/transliteration/-/transliteration-2.3.5.tgz",
    28067       "integrity": "sha512-HAGI4Lq4Q9dZ3Utu2phaWgtm3vB6PkLUFqWAScg/UW+1eZ/Tg6Exo4oC0/3VUol/w4BlefLhUUSVBr/9/ZGQOw==",
    28068       "requires": {
    28069         "yargs": "^17.5.1"
    28070       },
    28071       "dependencies": {
    28072         "yargs": {
    28073           "version": "17.5.1",
    28074           "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz",
    28075           "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==",
    28076           "requires": {
    28077             "cliui": "^7.0.2",
    28078             "escalade": "^3.1.1",
    28079             "get-caller-file": "^2.0.5",
    28080             "require-directory": "^2.1.1",
    28081             "string-width": "^4.2.3",
    28082             "y18n": "^5.0.5",
    28083             "yargs-parser": "^21.0.0"
    28084           }
    28085         },
    28086         "yargs-parser": {
    28087           "version": "21.0.1",
    28088           "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz",
    28089           "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg=="
    28090         }
    28091       }
    28092     },
    2809328023    "tryer": {
    2809428024      "version": "1.0.1",
  • reactapp/package.json

    rd654c74 r74b8c52  
    1919    "react-scripts": "5.0.1",
    2020    "styled-components": "^5.3.5",
    21     "transliteration": "^2.3.5",
    2221    "web-vitals": "^2.1.4"
    2322  },
  • reactapp/src/App.js

    rd654c74 r74b8c52  
    11import { Outlet } from "react-router-dom";
    22import { MainWrapper, MainTitle } from "./Components/Main.style";
    3 import Search from "./Components/Search.js";
    43
    54export default function App() {
     
    1615        }
    1716      </style>
    18       <MainTitle>profesori.mk</MainTitle> <Search />
     17      <MainTitle>profesori.mk</MainTitle>
    1918      <Outlet />
    2019    </MainWrapper>
  • reactapp/src/Components/Main.style.js

    rd654c74 r74b8c52  
    1717  text-decoration: underline 3px;
    1818  margin-bottom: 30px;
    19   width: fit-content;
    20   float: left;
    2119`;
  • reactapp/src/Components/ProfessorCard.style.js

    rd654c74 r74b8c52  
    66  padding: 10px;
    77  margin-bottom: 30px;
    8   margin-top: 140px;
    98`;
    109
  • reactapp/src/Components/Search.js

    rd654c74 r74b8c52  
    1 import React, { useEffect, useState } from "react";
    2 import JSOG from "jsog";
    3 import { transliterate } from "../Util/transliterate";
    4 import {
    5   SearchDropdownResultSmall,
    6   SearchDropdownTextSmall,
    7   SearchDropdownSmall,
    8   SearchDropdownResultLinkSmall,
    9   SearchSmall,
    10 } from "./Search.style";
    11 function Search() {
    12   const [query, setQuery] = useState("");
    13   const [professors, setProfessors] = useState([]);
    14 
    15   useEffect(() => {
    16     const url = `http://192.168.0.17:8080/public/professors/nameContains/${transliterate(
    17       query
    18     )}`;
    19 
    20     const fetchData = async () => {
    21       try {
    22         const response = await fetch(url);
    23         var cyclicGraph = await response.json();
    24         var jsogStructure = JSOG.encode(cyclicGraph); // has { '@ref': 'ID' } links instead of cycles
    25         cyclicGraph = JSOG.decode(jsogStructure);
    26         setProfessors(cyclicGraph);
    27         //setLoaded(true);
    28       } catch (error) {
    29         console.log("Error", error);
    30       }
    31     };
    32 
    33     if (query.length > 2) fetchData();
    34   }, [query]);
    35 
    36   return (
    37     <div
    38       style={{
    39         position: "relative",
    40         width: "fit-content",
    41         float: "right",
    42       }}
    43     >
    44       <SearchSmall
    45         placeholder="Пребарувај..."
    46         onChange={(e) => setQuery(e.target.value)}
    47       />
    48       <SearchDropdownSmall
    49         display={query.length > 2 && professors.length > 0 ? "block" : "none"}
    50       >
    51         {query.length > 2 &&
    52           professors.slice(0, 7).map((professor) => (
    53             <SearchDropdownResultSmall key={professor.professorId}>
    54               <SearchDropdownResultLinkSmall
    55                 href={"/professor/" + professor.professorId}
    56               >
    57                 <SearchDropdownTextSmall weight="bold" size="medium">
    58                   {professor.professorName}
    59                 </SearchDropdownTextSmall>
    60                 <SearchDropdownTextSmall weight="normal" size="smaller">
    61                   {professor.faculty.facultyName}
    62                 </SearchDropdownTextSmall>
    63               </SearchDropdownResultLinkSmall>
    64             </SearchDropdownResultSmall>
    65           ))}
    66       </SearchDropdownSmall>
    67     </div>
    68   );
    69 }
    70 
    71 export default Search;
  • reactapp/src/Pages/Professor.js

    rd654c74 r74b8c52  
    33import JSOG from "jsog";
    44import OpinionTree from "../Components/OpinionTree";
     5import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
     6import {
     7  solid,
     8  regular,
     9  brands,
     10} from "@fortawesome/fontawesome-svg-core/import.macro";
    511
    612import {
     
    6470    return (
    6571      <div>
    66         <p style={{ marginTop: "140px" }}>се вчитува...</p>
     72        <p>loading</p>
    6773        <Outlet />
    6874      </div>
Note: See TracChangeset for help on using the changeset viewer.