main
Last change
on this file since 8d83180 was 3e98cea, checked in by unknown <mlviktor23@…>, 2 years ago |
added SearchResults page, hide search dropdown when out of focus
|
-
Property mode
set to
100644
|
File size:
983 bytes
|
Line | |
---|
1 | import React from "react";
|
---|
2 | import { useLocation } from "react-router";
|
---|
3 | import {
|
---|
4 | SearchResultText,
|
---|
5 | SearchResultsWrapper,
|
---|
6 | SearchResult,
|
---|
7 | SearchResultLink,
|
---|
8 | } from "../Components/Styled/Search.style";
|
---|
9 |
|
---|
10 | function SearchResults() {
|
---|
11 | const location = useLocation();
|
---|
12 |
|
---|
13 | return (
|
---|
14 | <SearchResultsWrapper>
|
---|
15 | <h3 style={{ marginBottom: "30px" }}>Резултати од пребарувањето:</h3>
|
---|
16 | {location.state.map((professor) => (
|
---|
17 | <SearchResult key={professor.professorId} margin="10px">
|
---|
18 | <SearchResultLink href={"/professor/" + professor.professorId}>
|
---|
19 | <SearchResultText weight="bold" size="medium">
|
---|
20 | {professor.professorName}
|
---|
21 | </SearchResultText>
|
---|
22 | <SearchResultText weight="normal" size="er">
|
---|
23 | {professor.faculty.facultyName}
|
---|
24 | </SearchResultText>
|
---|
25 | </SearchResultLink>
|
---|
26 | </SearchResult>
|
---|
27 | ))}
|
---|
28 | </SearchResultsWrapper>
|
---|
29 | );
|
---|
30 | }
|
---|
31 |
|
---|
32 | export default SearchResults;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.