Skip to content

Commit

Permalink
fix(web): ts error and migrate zustand
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Oct 2, 2023
1 parent 894ed8f commit 7f970f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions apps/web/src/common/components/RichTextEditor/plugins/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ export const plugins = createPlugins(
components: {
/** Element */
[ELEMENT_BLOCKQUOTE]: BlockquoteElement,
// @ts-expect-error incompatible types
[ELEMENT_H1]: withProps(StyledElement, { as: 'h1' }),
// @ts-expect-error incompatible types
[ELEMENT_LI]: withProps(StyledElement, { as: 'li' }),
// @ts-expect-error incompatible types
[ELEMENT_UL]: withProps(StyledElement, {
as: 'ul',
styles: {
Expand All @@ -92,6 +95,7 @@ export const plugins = createPlugins(
`,
},
}),
// @ts-expect-error incompatible types
[ELEMENT_OL]: withProps(StyledElement, {
as: 'ol',
styles: {
Expand All @@ -101,6 +105,7 @@ export const plugins = createPlugins(
`,
},
}),
// @ts-expect-error incompatible types
[ELEMENT_PARAGRAPH]: withProps(StyledElement, {
as: 'p',
styles: {
Expand All @@ -112,10 +117,15 @@ export const plugins = createPlugins(
prefixClassNames: 'p',
}),
/** Mark */
// @ts-expect-error incompatible types
[MARK_BOLD]: withProps(StyledLeaf, { as: 'strong' }),
// @ts-expect-error incompatible types
[MARK_CODE]: withProps(StyledLeaf, { as: 'code' }),
// @ts-expect-error incompatible types
[MARK_ITALIC]: withProps(StyledLeaf, { as: 'em' }),
// @ts-expect-error incompatible types
[MARK_STRIKETHROUGH]: withProps(StyledLeaf, { as: 's' }),
// @ts-expect-error incompatible types
[MARK_UNDERLINE]: withProps(StyledLeaf, { as: 'u' }),
},
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/store/consents.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getCookie, setCookies } from 'cookies-next'
import create from 'zustand'
import { create } from 'zustand'

import { CookieKey } from '@web/common/constants/cookie'
import { Tracker } from '@web/common/tracker'
Expand Down

0 comments on commit 7f970f7

Please sign in to comment.