Skip to content

Commit

Permalink
Merge pull request #4307 from serlo/fix/render-toasts-in-editor-integ…
Browse files Browse the repository at this point in the history
…rations

fix(editor): Render toasts in Toaster
  • Loading branch information
CodingDive authored Nov 21, 2024
2 parents e9d6d2b + 9ad96ad commit 2e22a09
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/editor/src/core/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { getEditorVersion } from '@editor/package/editor-version'
import { cn } from '@editor/utils/cn'
import { useState, useMemo } from 'react'
import { Toaster } from 'react-hot-toast'
import { HotkeysProvider } from 'react-hotkeys-hook'
import { Provider } from 'react-redux'

Expand Down Expand Up @@ -43,7 +44,12 @@ export function Editor(props: EditorProps) {
setUseStored={setUseStored}
/>
</>
) : null}
) : (
// 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 />
)}
<div
className={cn(
'editor-core mb-24 text-lg leading-cozy',
Expand Down

0 comments on commit 2e22a09

Please sign in to comment.