Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"glob": "^11.0.0",
"lru-cache": "^11.0.1",
"postcss-resolve-url": "^0.0.1",
"react": "^19.0.0",
"react": "^18.3.1",
"react-cookie": "^7.2.2",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.2",
Expand Down
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import "./style/App.css";
import Home from "./shared/pages/Home.tsx";
import PageNotFound from "./shared/pages/404.tsx";
import MainNavigation from "./shared/components/Navigation/MainNavigation.tsx";
import Jobs from "./opportunities/pages/Jobs.js";
import Jobs from "./opportunities/pages/Jobs.tsx";
import Departments from "./staff/pages/Departments.tsx";
import StaffPage from "./staff/pages/Staff.tsx";
import Department from "./staff/pages/Department.tsx";
import CreatePost from "./staff/pages/CreatePost.tsx";
import IndividualPost from "./opportunities/pages/IndividualPost.js";
import IndividualPost from "./opportunities/pages/IndividualPost.tsx";
import ProfilePage from "./shared/pages/Profile.tsx";
import LoginRedirection from "./auth/Login.tsx";
import LogoutRedirection from "./auth/Logout.tsx";
Expand Down
42 changes: 0 additions & 42 deletions src/opportunities/components/FiltersField.js

This file was deleted.

58 changes: 58 additions & 0 deletions src/opportunities/components/FiltersField.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from "react";
import SmallTextButton from "./SmallTextButton.tsx";
import SearchBar from "./SearchBar.tsx";
import GroupedComponents from "../../shared/components/UIElements/GroupedComponents";
import HorizontalIconButton from "./HorizontalIconButton.tsx";
import { PiSlidersHorizontal } from "react-icons/pi";
import { MdCancel } from "react-icons/md";
import PropTypes from "prop-types";

const FiltersField = ({ resetFilters, deleteFilter, filters, setPopUpMenu }) => {

return (
<div>
<hr />
<div className="px-3 max-h-20 flex">
<div className="flex gap-2 w-full">
<SearchBar />

<SmallTextButton className="" onClick={setPopUpMenu} special={true}>
<PiSlidersHorizontal className="pr-1"/>
Change Filters
<PiSlidersHorizontal className="pl-1"/>
</SmallTextButton>

{/* Fix rendering with new filters = [ [],[],[] ]*/}
<GroupedComponents gap={2}>
{filters[1].map((filter) => {
return(
<HorizontalIconButton
onClick={deleteFilter}
icon={<MdCancel />}
key={filter}
special={false}
>
{filter}
</HorizontalIconButton>
)
})}
</GroupedComponents>
</div>

<SmallTextButton className="flex flex-right" onClick={resetFilters} special={true}>
Reset
</SmallTextButton>
</div>
<hr />
</div>
);
};

FiltersField.propTypes = {
resetFilters: PropTypes.func.isRequired,
deleteFilter: PropTypes.func.isRequired,
filters: PropTypes.arrayOf(PropTypes.array),
setPopUpMenu: PropTypes.func.isRequired,
};

export default FiltersField;
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Children } from "react";
import React from "react";
import PropTypes from "prop-types";

const HorizontalIconButton = ({ children, onClick, icon, special }) => {
return (
Expand All @@ -20,4 +21,11 @@ const HorizontalIconButton = ({ children, onClick, icon, special }) => {
);
};

HorizontalIconButton.propTypes = {
children: PropTypes.node,
onClick: PropTypes.func.isRequired,
icon: PropTypes.node,
special: PropTypes.bool,
}

export default HorizontalIconButton;
89 changes: 0 additions & 89 deletions src/opportunities/components/Posts.js

This file was deleted.

Loading