Skip to content

Commit

Permalink
Add open application listing to jobs that opens mail client
Browse files Browse the repository at this point in the history
  • Loading branch information
tormodhau committed Nov 21, 2023
1 parent 930d8b0 commit 40083aa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
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:soknad@variant.no?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>
);
}

0 comments on commit 40083aa

Please sign in to comment.