Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web-channel): before_widget overridable component #12585

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/channel-web/src/views/lite/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import React from 'react'
import { injectIntl } from 'react-intl'

import Container from './components/Container'
import OverridableComponent from './components/OverridableComponent'
import Stylesheet from './components/Stylesheet'
import constants from './core/constants'
import BpSocket from './core/socket'
Expand Down Expand Up @@ -373,7 +374,7 @@ class Web extends React.Component<MainProps> {
})}
</h1>
)}

<OverridableComponent name={'before_widget'} original={null} />
{this.props.displayWidgetView ? this.renderWidget() : <Container />}
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion modules/channel-web/src/views/lite/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export interface Config {
viewMode?: 'Embedded' | 'Fullscreen'
}

type OverridableComponents = 'below_conversation' | 'before_container' | 'composer'
type OverridableComponents = 'below_conversation' | 'before_container' | 'composer' | 'before_widget'

interface Overrides {
[componentToOverride: string]: [
Expand Down