Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add open application listing to jobs that opens mail client #429

Merged
merged 1 commit into from
Nov 23, 2023
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
2 changes: 2 additions & 0 deletions src/jobs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { and } from 'src/utils/css';
import JobListingItem from './list-item';
import { OfficeSelector } from 'src/office-selector';
import PageTitle from '@components/page-title';
import OpenApplicationListingItem from './open-application-listing-item';

const JobsIndex: NextPage<InferGetStaticPropsType<typeof getStaticProps>> = ({
listings,
Expand Down Expand Up @@ -112,6 +113,7 @@ const JobsIndex: NextPage<InferGetStaticPropsType<typeof getStaticProps>> = ({
key={`${item.name}_${item.title}_${item.location}`}
/>
))}
<OpenApplicationListingItem/>
</section>
<section className={style.omVariant}>
<h2>Variantdag - November 2019</h2>
Expand Down
27 changes: 27 additions & 0 deletions src/jobs/open-application-listing-item.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { ButtonNextLink } from 'src/components/button';
import { and } from 'src/utils/css';
import style from './index.module.css';

const emailSubject = "Åpen søknad - Oslo/Trondheim/Bergen";
const emailBody =
`
Så hyggelig at du ønsker å jobbe hos oss!

Tips: Husk å oppdatere emnefeltet med hvilken by du ønsker å skrive til, så vet vi hvem som skal svare deg.
`;
const mailtoLink = `mailto:[email protected]?subject=${encodeURIComponent(emailSubject)}&body=${encodeURIComponent(emailBody)}`;

export default function OpenApplicationListingItem() {
return (
<section className={style.job__listing__container}>
<div>
<h3 className={and(style.job__title, 'fancy')}>Åpen Søknad</h3>
<span>Finner du ikke en stilling som passer deg?</span>
</div>
<ButtonNextLink href={mailtoLink} aria-label="Send en åpen søknad">
Send en åpen søknad
</ButtonNextLink>
</section>
);
}
Loading