diff --git a/FrontEnd/public/companies-logos/defaultcompanybanner.png b/FrontEnd/public/companies-logos/defaultcompanybanner.png
deleted file mode 100644
index eaf1b24d5..000000000
Binary files a/FrontEnd/public/companies-logos/defaultcompanybanner.png and /dev/null differ
diff --git a/FrontEnd/src/App.js b/FrontEnd/src/App.js
index 7b06606b4..a0e7ea94b 100644
--- a/FrontEnd/src/App.js
+++ b/FrontEnd/src/App.js
@@ -5,7 +5,6 @@ import AdminPage from './components/adminPage/AdminPage';
import BasicPage from './components/basicPage/BasicPage';
import { AuthContext } from './context';
import { useProvideAuth } from './hooks';
-import { Search } from './components/SearchPage/Search';
function App() {
const auth = useProvideAuth();
@@ -16,8 +15,7 @@ function App() {
} />
- } />
- } />
+ } />
diff --git a/FrontEnd/src/components/SearchPage/Search.js b/FrontEnd/src/components/SearchPage/Search.jsx
similarity index 97%
rename from FrontEnd/src/components/SearchPage/Search.js
rename to FrontEnd/src/components/SearchPage/Search.jsx
index 438c8fd3d..620ed747d 100644
--- a/FrontEnd/src/components/SearchPage/Search.js
+++ b/FrontEnd/src/components/SearchPage/Search.jsx
@@ -13,9 +13,10 @@ import PropTypes from 'prop-types';
const ITEMS_PER_PAGE = 6;
-export function Search({ isAuthorized }) {
+export function Search({ isAuthorized, userData }) {
Search.propTypes = {
isAuthorized: PropTypes.any.isRequired,
+ userData: PropTypes.any.isRequired,
};
const [searchResults, setSearchResults] = useState([]);
@@ -94,6 +95,7 @@ export function Search({ isAuthorized }) {
searchPerformed={searchPerformed}
displayedResults={displayedResults}
isAuthorized={isAuthorized}
+ userData={userData}
/>
>
diff --git a/FrontEnd/src/components/SearchPage/search_field/SearchResults.js b/FrontEnd/src/components/SearchPage/search_field/SearchResults.jsx
similarity index 90%
rename from FrontEnd/src/components/SearchPage/search_field/SearchResults.js
rename to FrontEnd/src/components/SearchPage/search_field/SearchResults.jsx
index 36e4dde41..38c6817b3 100644
--- a/FrontEnd/src/components/SearchPage/search_field/SearchResults.js
+++ b/FrontEnd/src/components/SearchPage/search_field/SearchResults.jsx
@@ -2,11 +2,12 @@ import CompanyCard from './companies/CompanyCard';
import styles from './Text.module.css';
import PropTypes from 'prop-types';
-const SearchResults = ({ results, displayedResults, isAuthorized }) => {
+const SearchResults = ({ results, displayedResults, isAuthorized, userData }) => {
SearchResults.propTypes = {
results: PropTypes.array,
displayedResults: PropTypes.array,
isAuthorized: PropTypes.object,
+ userData: PropTypes.any.isRequired,
};
let error = null;
@@ -22,7 +23,7 @@ const SearchResults = ({ results, displayedResults, isAuthorized }) => {
{displayedResults.map((result, resultIndex) => (
-
+
))}
diff --git a/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.js b/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.jsx
similarity index 89%
rename from FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.js
rename to FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.jsx
index 8cd6dc057..4a41bee10 100644
--- a/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.js
+++ b/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.jsx
@@ -7,10 +7,11 @@ import axios from 'axios';
import styles from './CompanyCard.module.css';
import PropTypes from 'prop-types';
-const CompanyCard = ({ companyData, isAuthorized }) => {
+const CompanyCard = ({ companyData, isAuthorized, userData }) => {
CompanyCard.propTypes = {
companyData: PropTypes.object,
isAuthorized: PropTypes.object,
+ userData: PropTypes.any.isRequired,
};
const { mutate } = useSWRConfig();
@@ -56,6 +57,11 @@ const CompanyCard = ({ companyData, isAuthorized }) => {
}
setUsersSavedList(NewList);
+ if (companyData.id == userData.id) {
+ setStar(false);
+ setIsSaved(false);
+ setSearchPerformed(true);
+ } else {
if (usersSavedList.includes(companyData.id)) {
setStar(filledStar);
setIsSaved(true);
@@ -64,7 +70,7 @@ const CompanyCard = ({ companyData, isAuthorized }) => {
setStar(outlinedStar);
}
setSearchPerformed(true);
- }
+ }}
const { trigger } = useSWRMutation(
`${process.env.REACT_APP_BASE_API_URL}/api/saved-list/`,
@@ -120,11 +126,15 @@ const CompanyCard = ({ companyData, isAuthorized }) => {
-
+ ) : (
+
+ )}
@@ -137,7 +147,7 @@ const CompanyCard = ({ companyData, isAuthorized }) => {
{companyData.name}
diff --git a/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.module.css b/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.module.css
index cc342f8fb..eb7980cf5 100644
--- a/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.module.css
+++ b/FrontEnd/src/components/SearchPage/search_field/companies/CompanyCard.module.css
@@ -22,10 +22,11 @@
height: 220px;
}
.company-card__image {
- width: 360px;
- height: 290px;
+ width: 103px;
+ height: 80px;
flex-shrink: 0;
- border-radius: 11px;
+ margin-top: 80px;
+ margin-left: 125px;
object-fit: cover;
opacity: 0.7;
}
diff --git a/FrontEnd/src/components/adminPage/header/Header.jsx b/FrontEnd/src/components/adminPage/header/Header.jsx
index 390825631..74bbee02b 100644
--- a/FrontEnd/src/components/adminPage/header/Header.jsx
+++ b/FrontEnd/src/components/adminPage/header/Header.jsx
@@ -5,7 +5,7 @@ function Header () {
return (