Possibility to display job ads in English
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import JobAd from "@models/JobAd";
|
||||
import { Accordion } from "@components/index";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import rehypeRaw from "rehype-raw";
|
||||
import rehypeSanitize from "rehype-sanitize";
|
||||
|
||||
interface JobAdListProps {
|
||||
jobAds: JobAd[];
|
||||
}
|
||||
|
||||
const List = styled.ul`
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
margin: 1rem 0;
|
||||
list-style: none;
|
||||
}
|
||||
`;
|
||||
|
||||
const JobAdList: React.FC<JobAdListProps> = ({ jobAds }) => (
|
||||
<List>
|
||||
{jobAds.map((ad) => (
|
||||
<li key={ad.id}>
|
||||
<Accordion title={ad.title_en}>
|
||||
<div>
|
||||
<p>
|
||||
{ad.description_en}
|
||||
</p>
|
||||
<ReactMarkdown rehypePlugins={[rehypeRaw, rehypeSanitize]}>
|
||||
{ad.content_en}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
</Accordion>
|
||||
</li>
|
||||
))}
|
||||
</List>
|
||||
|
||||
);
|
||||
|
||||
export default JobAdList;
|
||||
Reference in New Issue
Block a user