Skip to content

Commit

Permalink
Merge branch 'main' into release-0.46.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowfiend authored Aug 9, 2023
2 parents a976945 + 1243ce9 commit e902ae6
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions ui/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,19 @@ type PanelDescriptor = {
* return switchablePanels
* ```
*/
export function useSwitchablePanels(
panels: PanelDescriptor[]
): ReactElement | null {
export function useSwitchablePanels(panels: PanelDescriptor[]): JSX.Element {
const [panelNumber, setPanelNumber] = useState(0)

return React.Fragment({
children: [
SharedPanelSwitcher({
setPanelNumber,
panelNumber,
panelNames: panels.map(({ name }) => name),
}),
panels[panelNumber].panelElement(),
],
})
return React.createElement(
React.Fragment,
null,
SharedPanelSwitcher({
setPanelNumber,
panelNumber,
panelNames: panels.map(({ name }) => name),
}),
panels[panelNumber].panelElement()
)
}

export function useIsOnboarding(): boolean {
Expand Down

0 comments on commit e902ae6

Please sign in to comment.