Skip to content

Commit

Permalink
refactor(web): hide localstorage notice on editor-preview as well
Browse files Browse the repository at this point in the history
  • Loading branch information
elbotho committed Nov 29, 2024
1 parent dd693dd commit 087775e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/editor/src/core/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,18 @@ export function Editor(props: EditorProps) {
<DndWrapper>
<HotkeysProvider initiallyActiveScopes={['global']}>
{/* only on serlo for now */}
{isSerlo ? (
{isSerlo && !isSerloEditorPreviewPage ? (
<>
{isSerloEditorPreviewPage ? null : <EditorToolbar />}
<EditorToolbar />
<LocalStorageNotice
useStored={useStored}
setUseStored={setUseStored}
/>
</>
) : (
// For non serlo environments, we need to render the toaster
// https://react-hot-toast.com/docs/toaster (already gets rendered
// in the web project)
<Toaster />
)}
) : null}
{/* For non serlo environments, we need to render the toaster
(already gets rendered in the web project) */}
{!isSerlo ? <Toaster /> : null}
<div
className={cn(
'editor-core mb-24 text-lg leading-cozy',
Expand Down

0 comments on commit 087775e

Please sign in to comment.