diff --git a/pkg/interface/src/views/landscape/components/NewChannel.tsx b/pkg/interface/src/views/landscape/components/NewChannel.tsx index 81e3522ba..12ca02aa3 100644 --- a/pkg/interface/src/views/landscape/components/NewChannel.tsx +++ b/pkg/interface/src/views/landscape/components/NewChannel.tsx @@ -45,18 +45,16 @@ const formSchema = (members?: string[]) => writePerms: Yup.string() }); -interface NewChannelProps { +type NewChannelProps = { api: GlobalApi; group?: string; workspace: Workspace; - borderRadius?: number; - existingMembers?: Array; -} - + existingMembers: string[]; +} & PropFunc; export function NewChannel(props: NewChannelProps): ReactElement { const history = useHistory(); - const { api, group, workspace, borderRadius, existingMembers } = props; + const { api, group, workspace, existingMembers, ...rest } = props; const groups = useGroupState(state => state.groups); const waiter = useWaitForProps({ groups }, 5000); @@ -131,7 +129,7 @@ export function NewChannel(props: NewChannelProps): ReactElement { overflowY='auto' p={3} backgroundColor='white' - borderRadius={borderRadius} + {...rest} > state.groups); const group = groups[association.group]; let workspace = association.group; - const history = useHistory(); const [actionsWidth, setActionsWidth] = useState(0); if (group?.hidden && app === 'chat') { @@ -165,7 +162,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement { ); } - return <>; + return null; }; const MenuControl = () => (