Skip to content

Commit

Permalink
Redaktør: Fix bug where text version buttons would disappear on small…
Browse files Browse the repository at this point in the history
… screens
  • Loading branch information
eriksson-daniel committed Dec 9, 2024
1 parent 88ce3e6 commit f0f3d13
Showing 1 changed file with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const PublishedRichText = ({ text, maltekstseksjonId, hasDraft, setTabId

return (
<VStack ref={containerRef} position="relative" paddingBlock="2 0" flexGrow="1" overflowY="auto">
<VStack as="header" gap="2" marginBlock="0 2" minHeight="var(--a-spacing-8)">
<VStack as="header" gap="2" marginBlock="0 2">
<HStack gap="2" justify="space-between" align="center" paddingInline="0 2">
<Heading level="1" size="small">
{getTitle(text.title)}
Expand Down Expand Up @@ -83,21 +83,17 @@ export const PublishedRichText = ({ text, maltekstseksjonId, hasDraft, setTabId
</VStack>

{savedContent === null ? (
<>
<Alert variant="info" size="small">
Tekst for {LANGUAGE_NAMES[lang].toLowerCase()} mangler
</Alert>
</>
<Alert variant="info" size="small">
Tekst for {LANGUAGE_NAMES[lang].toLowerCase()} mangler
</Alert>
) : (
<>
<RedaktoerRichText
ref={editorRef}
editorId={`${text.id}-${lang}`}
savedContent={savedContent}
readOnly
lang={SPELL_CHECK_LANGUAGES[lang]}
/>
</>
<RedaktoerRichText
ref={editorRef}
editorId={`${text.id}-${lang}`}
savedContent={savedContent}
readOnly
lang={SPELL_CHECK_LANGUAGES[lang]}
/>
)}
</VStack>
);
Expand Down

0 comments on commit f0f3d13

Please sign in to comment.