Skip to content

Commit

Permalink
feat: Render description as markdown & remove title
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Jun 12, 2024
1 parent f459887 commit e39a384
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const ExperimentCollectionDashboard: React.FC<ExperimentCollectionDashboa
collectionSlug: experimentCollection.slug,
...experimentCollection.theme.header,
totalScore,
experimentCollectionTitle: experimentCollection.name,
experimentCollectionDescription: experimentCollection.description

} : undefined;
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Link } from "react-router-dom";

import Rank from "../Rank/Rank";
import Social from "../Social/Social"
import HTML from '@/components/HTML/HTML';

interface HeaderProps {
experimentCollectionTitle: string;
Expand All @@ -21,7 +22,6 @@ interface Score {
}

export const Header: React.FC<HeaderProps> = ({
experimentCollectionTitle,
experimentCollectionDescription,
nextExperimentSlug,
nextExperimentButtonText,
Expand All @@ -38,7 +38,6 @@ export const Header: React.FC<HeaderProps> = ({
'hashtags': ["amsterdammusiclab", "citizenscience"]
}


const useAnimatedScore = (targetScore: number) => {
const [score, setScore] = useState(0);

Expand Down Expand Up @@ -95,8 +94,7 @@ export const Header: React.FC<HeaderProps> = ({
return (
<div className="hero aha__header">
<div className="intro">
<h1>{experimentCollectionTitle}</h1>
<p>{experimentCollectionDescription}</p>
<HTML body={experimentCollectionDescription} innerClassName="py-3" />
<nav className="actions">
{nextExperimentSlug && <a className="btn btn-lg btn-primary" href={`/${nextExperimentSlug}`}>{nextExperimentButtonText}</a>}
{aboutButtonText && <Link className="btn btn-lg btn-outline-primary" to={`/collection/${collectionSlug}/about`}>{aboutButtonText}</Link>}
Expand Down

0 comments on commit e39a384

Please sign in to comment.