Skip to content

Commit

Permalink
Merge pull request #16 from lugvitc/dev-close
Browse files Browse the repository at this point in the history
Close recruitments
  • Loading branch information
WizzyGeek authored Jun 25, 2024
2 parents ff2b6d8 + 3ec1931 commit 5bf9368
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/pages/apply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "react";
import { SessionContext, supabase } from "../supabase";
import { useNavigate } from "react-router-dom";
import { rec_open } from ".";
// import { useEffect, useRef } from 'react';

const departments = {
Expand Down Expand Up @@ -299,7 +300,7 @@ function onSumbitFactory(
return onSubmit;
}

const open = true;
// const open = true;

export default function Apply() {
const session = useContext(SessionContext);
Expand All @@ -326,7 +327,7 @@ export default function Apply() {
<section className={(session !== null ? "apply" : "") + " main"}>
<main>
<CountContext.Provider value={count || 0}>
{open ? (session !== null ? (
{rec_open ? (session !== null ? (
<div className=" border-2 sm:rounded-md sm:w-fit w-full max-w-[640px] border-[#202020] text-white backdrop-blur-md bg-[#ffffff09]">
{(count || 0) < 2 ? (
<Formik
Expand Down
19 changes: 16 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Card from "../components/Card";

import "./index.scss";

export const rec_open = false;

export default function Root() {
// const txtsh = "0px 0px 2px rgb(250 204 21)";
// style={{textShadow: `${txtsh}` }}
Expand All @@ -21,10 +23,16 @@ export default function Root() {
Elite
</span>
</div>
<div className=" w-52 font-semibold">Recruitments close at <wbr/> midnigth June 25</div>
{!rec_open ? (<div className=" w-52 font-semibold">Recruitments are closed <br />Join the <a href="https://chat.whatsapp.com/KdZQ7vmM4JSFjTJSx7togp" className=" underline text-blue-500">whatsapp group</a> if you have applied</div>) : null}
<Link
aria-disabled="true"
to="/apply"
className=" rounded-md text-xl mt-4 text-center p-2 bg-yellow-400 text-black uppercase font-semibold hover:bg-black hover:text-white transition-all border border-yellow-400"
className={
"rounded-md mt-4 text-xl text-center p-2 text-black font-semibold transition-all border" +
(!rec_open
? " bg-yellow-700 border-yellow-700 pointer-events-none"
: " bg-yellow-400 hover:bg-black hover:text-white border-yellow-400")
}
>
Apply
</Link>
Expand Down Expand Up @@ -144,7 +152,12 @@ export default function Root() {
</h1>
<Link
to="/apply"
className=" rounded-md text-xl mt-4 text-center p-2 bg-yellow-400 text-black uppercase font-semibold hover:bg-black hover:text-white transition-all border border-yellow-400"
className={
"rounded-md mt-4 text-xl text-center p-2 text-black font-semibold transition-all border" +
(!rec_open
? " bg-yellow-700 border-yellow-700 pointer-events-none"
: " bg-yellow-400 hover:bg-black hover:text-white border-yellow-400")
}
>
Apply
</Link>
Expand Down

0 comments on commit 5bf9368

Please sign in to comment.