Skip to content

Commit

Permalink
feat(desk)!: drop urlParams on custom user panes
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `urlParams` has been available through the `usePaneRouter()` hook as `params`
since version 2.2.0. This commit drops this prop from being passed, since we prefer it to be
retrieved through the hook instead.
  • Loading branch information
rexxars committed Sep 23, 2022
1 parent 1d17b61 commit 13b4567
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {createElement, isValidElement, useState} from 'react'
import {isValidElementType} from 'react-is'
import {Pane, usePaneRouter} from '../../components'
import {Pane} from '../../components'
import {DeskToolPaneActionHandler} from '../../types'
import {BaseDeskToolPaneProps} from '../types'
import {UserComponentPaneHeader} from './UserComponentPaneHeader'
Expand All @@ -13,7 +13,6 @@ type UserComponentPaneProps = BaseDeskToolPaneProps<'component'>
*/
export function UserComponentPane(props: UserComponentPaneProps) {
const {index, pane, paneKey, ...restProps} = props
const {params} = usePaneRouter()
const {
child,
component,
Expand Down Expand Up @@ -48,8 +47,6 @@ export function UserComponentPane(props: UserComponentPaneProps) {
...({ref: setRef} as any),
child: child as any, // @todo: Fix typings
paneKey,
// NOTE: this is for backwards compatibility (<= 2.20.0)
urlParams: params,
})}

{isValidElement(component) && component}
Expand Down

0 comments on commit 13b4567

Please sign in to comment.