From bb9cfa0cd11c7118017da9fcdd6f242e636a3e79 Mon Sep 17 00:00:00 2001 From: Bel Curcio <curciobel@gmail.com> Date: Thu, 3 Jun 2021 20:21:08 -0300 Subject: [PATCH] Changes --- components/common/SidebarLayout/SidebarLayout.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/components/common/SidebarLayout/SidebarLayout.tsx b/components/common/SidebarLayout/SidebarLayout.tsx index 713862496..db2ce13b0 100644 --- a/components/common/SidebarLayout/SidebarLayout.tsx +++ b/components/common/SidebarLayout/SidebarLayout.tsx @@ -4,13 +4,10 @@ import { UserNav } from '@components/common' import cn from 'classnames' import s from './SidebarLayout.module.css' -interface BaseProps { - className?: string -} - -type ComponentProps = - | (BaseProps & { handleClose: () => any }) - | (BaseProps & { handleBack: () => any }) +type ComponentProps = { className?: string } & ( + | { handleClose: () => any; handleBack?: never } + | { handleBack: () => any; handleClose?: never } +) const SidebarLayout: FC<ComponentProps> = ({ children,