Fixed bug where post would unwantendly display the return button on mobile

This commit is contained in:
DrMint 2022-04-23 20:31:49 +02:00
parent 7dc8ab3a28
commit 351c526dbe
1 changed files with 10 additions and 8 deletions

View File

@ -10,7 +10,6 @@ import {
import { useEffect, useMemo, useState } from "react"; import { useEffect, useMemo, useState } from "react";
import AppLayout from "./AppLayout"; import AppLayout from "./AppLayout";
import Chip from "./Chip"; import Chip from "./Chip";
import ThumbnailHeader from "./Content/ThumbnailHeader";
import HorizontalLine from "./HorizontalLine"; import HorizontalLine from "./HorizontalLine";
import LanguageSwitcher from "./LanguageSwitcher"; import LanguageSwitcher from "./LanguageSwitcher";
import Markdawn from "./Markdown/Markdawn"; import Markdawn from "./Markdown/Markdawn";
@ -19,6 +18,7 @@ import ReturnButton, { ReturnButtonType } from "./PanelComponents/ReturnButton";
import ContentPanel from "./Panels/ContentPanel"; import ContentPanel from "./Panels/ContentPanel";
import SubPanel from "./Panels/SubPanel"; import SubPanel from "./Panels/SubPanel";
import RecorderChip from "./RecorderChip"; import RecorderChip from "./RecorderChip";
import ThumbnailHeader from "./ThumbnailHeader";
import ToolTip from "./ToolTip"; import ToolTip from "./ToolTip";
interface Props { interface Props {
@ -164,13 +164,15 @@ export default function Post(props: Props): JSX.Element {
const contentPanel = ( const contentPanel = (
<ContentPanel> <ContentPanel>
{returnHref && returnTitle && (
<ReturnButton <ReturnButton
href="/news" href={returnHref}
title={langui.news} title={returnTitle}
langui={langui} langui={langui}
displayOn={ReturnButtonType.mobile} displayOn={ReturnButtonType.mobile}
className="mb-10" horizontalLine
/> />
)}
{displayThumbnailHeader ? ( {displayThumbnailHeader ? (
<> <>