Remove JobAdView
This commit is contained in:
@@ -27,7 +27,6 @@ import StudiesPage from "./pages/StudiesPage";
|
||||
import CorporatePage from "./pages/CorporatePage";
|
||||
import InEnglishPage from "./pages/InEnglishPage";
|
||||
import EventPage from "./pages/EventPage";
|
||||
import JobAd from "@views/CorporatePage/JobAdView";
|
||||
import AdminJobAdPage from "@pages/admin/AdminJobAdPage";
|
||||
import JobAdCreatePage from "@pages/admin/JobAdCreatePage";
|
||||
|
||||
@@ -54,7 +53,6 @@ const commonRoutes = [
|
||||
{ path: "/opinnot_ja_ura", page: StudiesPage },
|
||||
{ path: "/yritysyhteistyo", page: CorporatePage },
|
||||
{ path: "/yhteystiedot", page: ContactsPage },
|
||||
{ path: "/jobads/:id", page: JobAd },
|
||||
{ path: "/in_english", page: InEnglishPage },
|
||||
];
|
||||
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import { Helmet } from "react-helmet";
|
||||
import { RouteComponentProps } from "react-router-dom";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import { colors } from "@theme/colors";
|
||||
import useFetchJobAd from "@hooks/useFetchJobAd";
|
||||
|
||||
const StyledSection = styled.section`
|
||||
margin: 2rem auto;
|
||||
max-width: 1000px;
|
||||
align-items: center;
|
||||
|
||||
& > h1 {
|
||||
color: ${colors.darkBlue};
|
||||
}
|
||||
|
||||
& > div > img {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
& > p {
|
||||
color: ${colors.orange1};
|
||||
}
|
||||
`;
|
||||
|
||||
const Content = styled.div`
|
||||
margin-top: 24px;
|
||||
|
||||
p {
|
||||
color: ${colors.black};
|
||||
}
|
||||
|
||||
h1, h3 {
|
||||
color: ${colors.orange2};
|
||||
}
|
||||
|
||||
a {
|
||||
color: ${colors.blue1};
|
||||
|
||||
&:hover {
|
||||
color: ${colors.lightBlue};
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
tr {
|
||||
vertical-align: top;
|
||||
|
||||
td {
|
||||
word-break: break-word;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
td:first-of-type {
|
||||
word-break: unset;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
interface MatchParams {
|
||||
id: string;
|
||||
}
|
||||
|
||||
type JobAdProps = RouteComponentProps<MatchParams>
|
||||
|
||||
const JobAdView: React.FC<JobAdProps> = ({ match: { params: { id } } }) => {
|
||||
const jobAd = useFetchJobAd(Number(id));
|
||||
if (!jobAd) return <div>Loading</div>
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
<link rel="canonical" href="https://sik.ayy.fi/INSERT_PATH_HERE!" />
|
||||
</Helmet>
|
||||
|
||||
<StyledSection>
|
||||
<h1>{jobAd.title_fi}</h1>
|
||||
<p>{jobAd.description_fi}</p>
|
||||
<Content>
|
||||
<ReactMarkdown source={jobAd.content_fi} escapeHtml={false} />
|
||||
</Content>
|
||||
</StyledSection>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default JobAdView;
|
||||
Reference in New Issue
Block a user