Skip to content

Commit

Permalink
refactor(ShowView.tsx): wrap Editor component in EditorContainer for …
Browse files Browse the repository at this point in the history
…better structure and organization

The Editor component is now wrapped in an EditorContainer component to improve the structure and organization of the code. This change enhances readability and maintainability of the ShowView component.
  • Loading branch information
ktun95 committed Jan 8, 2025
1 parent e116eb5 commit a1d5f08
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/stock-center/src/components/ShowView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ContentBySlugQuery } from "dicty-graphql-schema"
import { Editor } from "@dictybase/editor"
import { Editor, EditorContainer } from "@dictybase/editor"

Check failure on line 2 in apps/stock-center/src/components/ShowView.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

apps/stock-center/src/components/ShowView.tsx#L2

[import/named] EditorContainer not found in '@dictybase/editor'

type ShowViewProperties = {
data: NonNullable<ContentBySlugQuery["contentBySlug"]>
Expand All @@ -13,10 +13,12 @@ type ShowViewProperties = {
const ShowView = ({ data }: ShowViewProperties) => {
const { slug, content } = data
return (
<Editor
editable={false}
content={{ storageKey: slug, editorState: content }}
/>
<EditorContainer>
<Editor
editable={false}
content={{ storageKey: slug, editorState: content }}
/>
</EditorContainer>
)
}

Expand Down

0 comments on commit a1d5f08

Please sign in to comment.