fix: update sidebar close

This commit is contained in:
Madalina Raicu 2024-02-08 15:54:09 +00:00
parent d5ecc6e243
commit ccd73de19e
No known key found for this signature in database
GPG Key ID: 688B7B31149C1DCD

View File

@ -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 />;
} }