Skip to content

Commit

Permalink
fix TypeScript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
WofWca committed Dec 18, 2024
1 parent 1be4672 commit fdf7d63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/frontend/src/components/Gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export default class Gallery extends Component<
galleryImageKeepAspectRatio?: boolean
}
> {
static contextType = DialogContext
declare context: React.ContextType<typeof DialogContext>

dateHeader = createRef<HTMLDivElement>()
tabListRef = createRef<HTMLUListElement>()
constructor(props: Props) {
Expand Down Expand Up @@ -443,8 +446,6 @@ function GalleryTab(props: {
)
}

Gallery.contextType = DialogContext

function FileTable({
width,
height,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default class ComposerMessageInput extends React.Component<
ComposerMessageInputProps,
ComposerMessageInputState
> {
static contextType = DialogContext
declare context: React.ContextType<typeof DialogContext>

composerSize: number
setCursorPosition: number | false
textareaRef: React.RefObject<HTMLTextAreaElement>
Expand Down Expand Up @@ -229,5 +232,3 @@ export default class ComposerMessageInput extends React.Component<
)
}
}

ComposerMessageInput.contextType = DialogContext

0 comments on commit fdf7d63

Please sign in to comment.