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
1 change: 0 additions & 1 deletion Apply-For-Me-UI/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
Expand Down
14 changes: 7 additions & 7 deletions Apply-For-Me-UI/package-lock.json

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

4 changes: 2 additions & 2 deletions Apply-For-Me-UI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"atatus-spa": "^4.5.0",
"axios": "^1.2.0",
"formik": "^2.2.9",
"framer-motion": "^8.4.2",
"framer-motion": "^8.4.3",
"hamburger-react": "^2.5.0",
"jwt-decode": "^3.1.2",
"react": "^18.2.0",
Expand All @@ -36,7 +36,7 @@
"yup": "^0.32.11"
},
"scripts": {
"start": "set PORT=7000 && react-scripts start",
"start": "PORT=7000 react-scripts start",
"dev": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
Expand Down
6 changes: 3 additions & 3 deletions Apply-For-Me-UI/src/components/spinner/Spinner.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/* eslint-disable no-unused-vars */
import React from "react";
import { useState } from "react";
import PacmanLoader from "react-spinners/PacmanLoader";
import ScaleLoader from "react-spinners/ScaleLoader";
import classes from "./Spinner.module.css";
const Spinner = () => {
let [color] = useState("#2E3192");

return (
<div className={classes.spinner_container}>
<PacmanLoader
<ScaleLoader
color={color}
size={50}
size={100}
aria-label="Loading Spinner"
data-testid="loader"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const Table = () => {
setPageCout(response.data?.totalPages);
} catch (error) {
toast.error(`${error}`);
console.log("thisis", JSON.stringify(error.response))
}
}, [token, pagination.pageNo, pagination.pageSize]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const Table = () => {
}
);
setData(response.data?.content);
console.log(response.data?.content);
setPageCout(response.data?.totalPages);
setIsLoading(false);

Expand Down Expand Up @@ -100,13 +101,15 @@ const Table = () => {
<div className="table_wrap">
<div className="div_table">
<div className="div_table_child">Name</div>
<div className="div_table_child">Job Title</div>
<div className="div_table_child_hideOnMobile">Salary</div>
<div className="div_table_child">Type</div>
<div className="div_table_child">Details</div>
</div>
{data?.map((application, index) => {
return(
<div className="div_table" key={index}>
<div className="div_table_child">{application.professional.member.firstName}</div>
<div className="div_table_child">{application.profileTitle}</div>
<div className="div_table_child_hideOnMobile">{application.salaryRange}</div>
<div className="div_table_child">{application.preferredJobLocationType}</div>
Expand Down
23 changes: 0 additions & 23 deletions Apply-For-Me-UI/src/pages/paystack/paystack.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import jwt_decode from "jwt-decode";
import { useParams } from "react-router-dom";
import Spinner from "components/spinner/PulseLoader";
import { useState } from "react";
// import { useCallback } from "react";
import axios from "axios";
import { toast, ToastContainer } from "react-toastify";

Expand All @@ -13,26 +12,7 @@ export const PaystackPage = () => {
const { price, planName, paymentInterval } = useParams();
const channels = ["card", "bank"];
const currency = "NGN";

// const [convertedPrice, setConvertedPrice] = useState();
// const exchangeBaseUrl = "https://api.apilayer.com/exchangerates_data";
const token = localStorage.getItem("tokenHngKey");
// const convertToNaira = useCallback(async () => {
// try {
// const response = await axios.get(
// `${exchangeBaseUrl}/convert?to=NGN&from=USD&amount=${price}`,
// {
// headers: {
// "apikey": process.env.REACT_APP_EXCHANGE_RATE_API_KEY
// }
// }
// );
// setConvertedPrice(response?.data?.result);
// setLoading(false);
// } catch (err) {
// toast.error(err?.response?.data?.message);
// }
// }, [price]);

const createPlan = async(planName,paymentInterval)=>{
setLoading(true);
Expand Down Expand Up @@ -91,9 +71,6 @@ export const PaystackPage = () => {
setLoading(false);
}
}
// useEffect(() => {
// convertToNaira();
// }, [convertToNaira])

const handleSubmit = (e)=>{
e.preventDefault();
Expand Down
149 changes: 1 addition & 148 deletions Apply-For-Me-UI/src/pages/pricing_plan/Pricing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,12 @@ const Pricing = ({
const [paymentInterval, setpaymentInterval] = useState();
const [seeMore, setSeeMore] = useState(false);

//const data = seeMore ? plans : plansFull;

useEffect(() => {
toggle.yearly
? setpaymentInterval("yearly")
: setpaymentInterval("monthly");
}, [toggle.yearly, paymentInterval]);
//const location = useLocation();

//const { user } = useSelector(state => state.user);

const navigate = useNavigate();

return (
Expand Down Expand Up @@ -114,149 +110,6 @@ const Pricing = ({
therefore prices are not included in the pricing
plan but based on individual requests.
</p>
{/* <div className={styles.majorPlan}>
{data.map(
(
{
planName,
price,
duration,
model,
btnText,
stamp
},
index
) => {
return (
<div
className={styles.card}
key={index}
>
<div className={styles.choices}>
<p
className={
styles.choice_text
}
>
{stamp}
</p>
</div>

<h3
className={styles.card__heading}
>
{planName} Plan
</h3>
<p className={styles.card__price}>
$ {price}
</p>
<p
className={
styles.card__duration
}
>
{duration}
</p>

<div
className={styles.statusWrapper}
>
{model.map(
(
{ icon, text, alt },
index
) => {
return (
<div
className={
styles.status
}
key={index}
>
<img
src={icon}
alt={alt}
className={
styles.status__img
}
/>
<p
className={
styles.status__text
}
>
{text}
</p>
</div>
);
}
)}
</div>
{user ? (
<BlueButton
text="Get Plan"
width={200}
func={() => {
let isAuthorized;
user?.roles?.forEach(
role => {
if (
role.includes(
"Professional"
)
) {
isAuthorized = true;
}
}
);
if (
isAuthorized &&
price !== "0"
) {
navigate(
`/checkout/${planName}/${paymentInterval}/${price}`
);
} else if (
isAuthorized &&
price === "0"
) {
return;
} else {
toast.error(
"Unauthorized"
);
}
}}
/>
) : (
<>
<BlueButton
width={200}
text={btnText}
func={() =>
navigate("/wel2", {
state: {
from: location
}
})
}
/>{" "}
</>
)}
</div>
);
}
)}
</div> */}

{/* <div >
<p
className={styles.seemorePar}
>
See more plans
</p>
</div> */}

{!seeMore && (
<div className={styles.seemore}>
<button
Expand Down
Loading