2022-05-09 09:28:39 +02:00
|
|
|
// @flow
|
2021-07-19 19:58:40 +02:00
|
|
|
import React from 'react';
|
|
|
|
import Button from 'component/button';
|
|
|
|
|
2022-05-09 09:28:39 +02:00
|
|
|
type Props = {
|
|
|
|
meme: ?{ text: string, url: string },
|
|
|
|
};
|
|
|
|
|
|
|
|
export default function Meme(props: Props) {
|
|
|
|
const { meme } = props;
|
2022-04-15 14:50:15 +02:00
|
|
|
if (!meme) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2021-07-19 19:58:40 +02:00
|
|
|
return (
|
|
|
|
<h1 className="home__meme">
|
2022-04-15 14:50:15 +02:00
|
|
|
<Button button="link" navigate={meme.url}>
|
|
|
|
{meme.text}
|
2021-07-19 19:58:40 +02:00
|
|
|
</Button>
|
|
|
|
</h1>
|
|
|
|
);
|
|
|
|
}
|