Skip to content

Commit ecab403

Browse files
committed
fix: display 2024 job offers on 2024 route
1 parent 072f2a4 commit ecab403

File tree

17 files changed

+225
-396
lines changed

17 files changed

+225
-396
lines changed

src/2023/JobOffers/CompanyOffers.tsx

Lines changed: 0 additions & 69 deletions
This file was deleted.

src/2023/JobOffers/JobOffers.Style.ts

Lines changed: 0 additions & 129 deletions
This file was deleted.

src/2023/JobOffers/JobOffers2023.tsx

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,19 @@ import TitleSection from "../../components/SectionTitle/TitleSection";
1010
import { useWindowSize } from "react-use";
1111
import data from "../../data/2023.json";
1212
import {
13-
Companies,
14-
CompanyNameLink,
15-
StyledLessIcon,
16-
StyledMoreIcon,
17-
StyledTitleContainer,
18-
} from "./JobOffers.Style";
19-
import CompanyOffers from "./CompanyOffers";
13+
Companies, CompanyNameLink, StyledLessIcon, StyledMoreIcon,
14+
StyledTitleContainer
15+
} from "../../styles/JobOffers/JobOffers.Style";
16+
import CompanyOffers from "../../components/JobOffers/CompanyOffers";
2017

2118
const NoOffersAvailable = () => (
22-
<>
23-
{!data.jobOffers.enabled && (
2419
<h4 style={{ color: Color.DARK_BLUE }}>No job offers available yet</h4>
25-
)}
26-
</>
2720
);
2821

2922
const MoreThanLessThan = (props: { width: number }) => (
30-
<>
31-
{props.width > MOBILE_BREAKPOINT && (
32-
<>
23+
<>
3324
<StyledLessIcon src={LessThanBlueIcon} />
3425
<StyledMoreIcon src={MoreThanBlueIcon} />
35-
</>
36-
)}
3726
</>
3827
);
3928

@@ -54,8 +43,8 @@ const JobOffers2023: FC<React.PropsWithChildren<unknown>> = () => {
5443
color={Color.BLACK_BLUE}
5544
/>
5645
</StyledTitleContainer>
57-
<MoreThanLessThan width={width} />
58-
<NoOffersAvailable />
46+
{width > MOBILE_BREAKPOINT && <MoreThanLessThan width={width} />}
47+
{!data.jobOffers.enabled && <NoOffersAvailable />}
5948
{data.jobOffers.enabled && (
6049
<div id="job-offers">
6150
<Companies id="companies">

src/2023/JobOffers/JobsData.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Company } from "../../views/JobOffers/JobsData";
1+
import {Company} from "../../types/jobOffers";
22

33
export const jobOffers: Company[] = [
44
{
@@ -727,6 +727,3 @@ export const jobOffers: Company[] = [
727727
},
728728
];
729729

730-
export interface CompanyProps {
731-
company: Company;
732-
}

src/2023/JobOffers/components/JobsCard.tsx

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/2023/Talks/components/TalkCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, {FC} from "react";
22
import {Link} from "react-router";
3-
import {StyledJobsInfo} from "../../JobOffers/components/JobsCard";
43
import {Tag} from "../../../components/Tag/Tag";
54
import {
65
ROUTE_2023_TALK_DETAIL,
@@ -24,6 +23,7 @@ import {
2423
SessionCategory,
2524
SessionSpeaker
2625
} from "../../../types/sessions";
26+
import {StyledJobsInfo} from "../../../components/JobOffers/JobsCard";
2727

2828
interface TalkCardProps {
2929
index: number;

src/2024/JobOffers/JobOffers2024.tsx

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import { MOBILE_BREAKPOINT } from "../../constants/BreakPoints";
2+
import { Color } from "../../styles/colors";
3+
import { jobOffers } from "./JobsData";
4+
5+
import React, { FC } from "react";
6+
import LessThanBlueIcon from "../../assets/images/LessThanBlueIcon.svg";
7+
import MoreThanBlueIcon from "../../assets/images/MoreThanBlueIcon.svg";
8+
import SectionWrapper from "../../components/SectionWrapper/SectionWrapper";
9+
import TitleSection from "../../components/SectionTitle/TitleSection";
10+
import { useWindowSize } from "react-use";
11+
import data from "../../data/2024.json";
12+
import {
13+
Companies,
14+
CompanyNameLink,
15+
StyledLessIcon,
16+
StyledMoreIcon,
17+
StyledTitleContainer,
18+
} from "../../styles/JobOffers/JobOffers.Style";
19+
import CompanyOffers from "../../components/JobOffers/CompanyOffers";
20+
21+
const NoOffersAvailable = () => (
22+
<h4 style={{ color: Color.DARK_BLUE }}>No job offers available yet</h4>
23+
);
24+
25+
const MoreThanLessThan = () => (
26+
<>
27+
<StyledLessIcon src={LessThanBlueIcon} />
28+
<StyledMoreIcon src={MoreThanBlueIcon} />
29+
</>
30+
);
31+
32+
const JobOffers2024: FC<React.PropsWithChildren<unknown>> = () => {
33+
const { width } = useWindowSize();
34+
35+
React.useEffect(() => {
36+
document.title = `Job Offers - ${data.title} - ${data.edition}`;
37+
}, []);
38+
39+
return (
40+
<SectionWrapper color={Color.WHITE} marginTop={6} paddingBottom={100}>
41+
<section>
42+
<StyledTitleContainer>
43+
<TitleSection
44+
title="JOB OFFERS"
45+
subtitle="Have a look at some opportunities"
46+
color={Color.BLACK_BLUE}
47+
/>
48+
</StyledTitleContainer>
49+
{width > MOBILE_BREAKPOINT && <MoreThanLessThan/>}
50+
{!data.jobOffers.enabled && <NoOffersAvailable />}
51+
{data.jobOffers.enabled && (
52+
<div id="job-offers">
53+
<Companies id="companies">
54+
{jobOffers.map((company) => (
55+
<CompanyNameLink
56+
href={` #${company.name.replaceAll(" ", "-").toLowerCase()}`}
57+
key={company.id}
58+
>
59+
{company.name}
60+
</CompanyNameLink>
61+
))}
62+
</Companies>
63+
<div id="offers">
64+
{jobOffers.map((company) => (
65+
<CompanyOffers company={company} key={company.id} />
66+
))}
67+
</div>
68+
</div>
69+
)}
70+
</section>
71+
</SectionWrapper>
72+
);
73+
};
74+
75+
export default JobOffers2024;

0 commit comments

Comments
 (0)