Skip to content

Commit

Permalink
fixing bugs and bookmark issue (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
marwazpov authored Nov 27, 2022
1 parent 2254560 commit 83c6e38
Show file tree
Hide file tree
Showing 42 changed files with 338 additions and 432 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"react/jsx-props-no-spreading": "off",
"import/no-cycle": "off",
"import/prefer-default-export": "off"

}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"react-router-dom": "6",
"react-scripts": "^5.0.1",
"react-test-renderer": "^18.2.0",
"react-toastify": "^9.1.1",
"web-vitals": "^2.1.0",
"yup": "^0.32.11"
},
Expand Down
Binary file added public/assets/meetOurTeam/paywand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="/siteLogo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React Redux App</title>
<title>Jobie</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file added public/siteLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { React, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useDispatch } from "react-redux";
import { Route, Routes } from "react-router-dom";
import { signup, selectUser, signout } from "./features/user/userSlice";
import { signup, signout } from "./features/user/userSlice";
import { auth, onAuthStateChanged } from "./firebase";
import "./App.css";
import Navbar from "./components/Navbar/Navbar";
Expand All @@ -12,13 +12,12 @@ import ProfilePage from "./pages/profile";
import Index from "./pages/index";
import Footer from "./components/Footer/Footer";
import CombiningFilterComponents from "./components/CombiningComponents/CombiningFilterComponents";
import SignOut from "./components/signup/SignOut";
import RoadMaps from "./pages/roadmaps";
import ProfileEdit from "./pages/profile-edit";
import ContactPage from "./pages/contact";

function App() {
const user = useSelector(selectUser);

const dispatch = useDispatch();
useEffect(() => {
onAuthStateChanged(auth, (userAuth) => {
Expand All @@ -40,9 +39,8 @@ function App() {
return (
<div>
<Navbar />
<SignOut />
<Routes>
<Route path="/" element={user ? <Index /> : <SignUp />} />
<Route path="/" element= {<Index/> }/>
<Route path="/sign-up" element={<SignUp />} />
<Route path="/login" element={<Login />} />
<Route path="/about-us" element={<AboutPage />} />
Expand Down
84 changes: 46 additions & 38 deletions src/components/BookmarkedJobs/BookmarkedJobs.jsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,53 @@
import { bookmarkedJobsData } from "../../data/bookmarkedJobsData";
import { useEffect, useState } from "react";
import { bookmark } from "../../features/bookmark/bookmark";

function BookmarkedJobs() {
const closed = (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
className="w-5 h-5 fill-red-600 medium:w-4 medium:h-4 small:w-3 small:h-3"
>
<path
fillRule="evenodd"
d="M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z"
clipRule="evenodd"
/>
</svg>
);
const open = (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
className="w-5 h-5 fill-green-600 medium:w-4 medium:h-4 small:w-3 small:h-3"
>
<path
fillRule="evenodd"
d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z"
clipRule="evenodd"
/>
</svg>
);
const [markedJobs, setMarkedJobs] = useState([]);

console.log("cough", markedJobs);

useEffect(() => {
const getBookMarks = async () => {
const marks = await bookmark();
setMarkedJobs(marks);
};
getBookMarks();
}, []);

// const closed = (
// <svg
// xmlns="http://www.w3.org/2000/svg"
// viewBox="0 0 24 24"
// fill="currentColor"
// className="w-5 h-5 fill-red-600 medium:w-4 medium:h-4 small:w-3 small:h-3"
// >
// <path
// fillRule="evenodd"
// d="M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z"
// clipRule="evenodd"
// />
// </svg>
// );
// const open = (
// <svg
// xmlns="http://www.w3.org/2000/svg"
// viewBox="0 0 24 24"
// fill="currentColor"
// className="w-5 h-5 fill-green-600 medium:w-4 medium:h-4 small:w-3 small:h-3"
// >
// <path
// fillRule="evenodd"
// d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z"
// clipRule="evenodd"
// />
// </svg>
// );
return (
<div className=" px-96 py-4 medium:px-24 medium:py-2 small:px-4 small:py-2">
<h1 className="text-center text-3xl pb-10 font-semibold font-inter medium:text-2xl small:text-xl ">
<div className="pl-44 py-4 medium:px-24 medium:py-2 small:px-4 small:py-2">
<h1 className="mb-4 text-4xl text-dark-gray md:text-5xl lg:text-6x pb-7 text-left mt-8">
Bookmarked Jobs
</h1>
{bookmarkedJobsData.map((data) => {
{markedJobs.map((data) => {
return (
<div
key={data.id}
Expand Down Expand Up @@ -93,16 +106,11 @@ function BookmarkedJobs() {
</div>
</div>
</div>
<div className="flex items-center pr-4">
{data.status === "open" ? open : closed}
<p className="font-semibold pl-2 text-dark-gray medium:text-sm small:text-xs">
{data.status === "open" ? "open" : "closed"}
</p>
</div>
</div>
);
})}
</div>
);
}

export default BookmarkedJobs;
Loading

0 comments on commit 83c6e38

Please sign in to comment.