|
|
|
@ -1,12 +1,12 @@
|
|
|
|
|
import React from "react"; |
|
|
|
|
import "./CategoryLink.scss"; |
|
|
|
|
import { NavLink } from "react-router-dom"; |
|
|
|
|
import Accordion from "@material-ui/core/Accordion"; |
|
|
|
|
import AccordionSummary from "@material-ui/core/AccordionSummary"; |
|
|
|
|
import AccordionDetails from "@material-ui/core/AccordionDetails"; |
|
|
|
|
import Typography from "@material-ui/core/Typography"; |
|
|
|
|
import ExpandMoreIcon from "@material-ui/icons/ExpandMore"; |
|
|
|
|
import ArrowForwardIcon from "@material-ui/icons/ArrowForward"; |
|
|
|
|
import ReactMarkdown from "react-markdown"; |
|
|
|
|
|
|
|
|
|
interface CategoryProps { |
|
|
|
|
title: string; |
|
|
|
@ -27,12 +27,14 @@ const CategoryLink: React.FC<CategoryProps> = (category) => {
|
|
|
|
|
<Typography className="category-title">{category.title}</Typography> |
|
|
|
|
</AccordionSummary> |
|
|
|
|
<AccordionDetails className="acc-detail"> |
|
|
|
|
<Typography className="category-text">{category.content}</Typography> |
|
|
|
|
<div className="category-text"> |
|
|
|
|
<ReactMarkdown>{category.content}</ReactMarkdown> |
|
|
|
|
</div> |
|
|
|
|
<button |
|
|
|
|
className="category-button" |
|
|
|
|
onClick={(e) => { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
window.location.href = category.url; |
|
|
|
|
window.open(`${category.url}`, "_blank"); |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<span>Zur Datenquelle</span> <ArrowForwardIcon /> |
|
|
|
|