fix: update sidebar close
This commit is contained in:
parent
d5ecc6e243
commit
ccd73de19e
@ -27,7 +27,7 @@ export enum ViewType {
|
|||||||
Transfer = 'Transfer',
|
Transfer = 'Transfer',
|
||||||
Settings = 'Settings',
|
Settings = 'Settings',
|
||||||
ViewAs = 'ViewAs',
|
ViewAs = 'ViewAs',
|
||||||
Chart = 'Chart',
|
Close = 'Close',
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BarView =
|
export type BarView =
|
||||||
@ -53,7 +53,7 @@ export type BarView =
|
|||||||
type: ViewType.Settings;
|
type: ViewType.Settings;
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
type: ViewType.Chart;
|
type: ViewType.Close;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Sidebar = ({ options }: { options?: ReactNode }) => {
|
export const Sidebar = ({ options }: { options?: ReactNode }) => {
|
||||||
@ -101,9 +101,9 @@ export const Sidebar = ({ options }: { options?: ReactNode }) => {
|
|||||||
) : (
|
) : (
|
||||||
currView && (
|
currView && (
|
||||||
<SidebarButton
|
<SidebarButton
|
||||||
view={ViewType.Chart}
|
view={ViewType.Close}
|
||||||
icon={VegaIconNames.ARROW_LEFT}
|
icon={VegaIconNames.ARROW_LEFT}
|
||||||
tooltip={t('Back to chart')}
|
tooltip={t('Back')}
|
||||||
routeId={currentRouteId}
|
routeId={currentRouteId}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
@ -211,7 +211,7 @@ export const SidebarContent = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (view.type === ViewType.Chart) {
|
if (view.type === ViewType.Close) {
|
||||||
return <CloseSidebar />;
|
return <CloseSidebar />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user