Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed May 4, 2022
1 parent 2c4cb35 commit c2bd911
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/app/ui-utils/client/lib/SideNav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const SideNav = new (class extends Emitter<{

private flexNav: JQuery<HTMLElement>;

toggleFlex(status: 1 | -1, callback: () => void): void {
toggleFlex(status: 1 | -1, callback?: () => void): void {
if (this.animating === true) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useMemo, useEffect, memo } from 'react';
import React, { useCallback, useMemo, useEffect, memo, FC } from 'react';

import { menu, SideNav } from '../../../../app/ui-utils/client';
import PlanTag from '../../../components/PlanTag';
Expand All @@ -11,7 +11,7 @@ import SettingsProvider from '../../../providers/SettingsProvider';
import AdminSidebarPages from './AdminSidebarPages';
import AdminSidebarSettings from './AdminSidebarSettings';

function AdminSidebar() {
const AdminSidebar: FC = () => {
const t = useTranslation();

const canViewSettings = useAtLeastOnePermission(
Expand All @@ -28,7 +28,8 @@ function AdminSidebar() {
}, []);

const currentRoute = useCurrentRoute();
const currentPath = useRoutePath(...currentRoute);
const [currentRouteName, currentRouteParams, currentQueryStringParams] = currentRoute;
const currentPath = useRoutePath(currentRouteName || '', currentRouteParams, currentQueryStringParams);
const [, , , currentRouteGroupName] = currentRoute;

useEffect(() => {
Expand All @@ -50,12 +51,12 @@ function AdminSidebar() {
}
/>
<Sidebar.Content>
<AdminSidebarPages currentPath={currentPath} />
{canViewSettings && <AdminSidebarSettings currentPath={currentPath} />}
<AdminSidebarPages currentPath={currentPath || ''} />
{canViewSettings && <AdminSidebarSettings currentPath={currentPath || ''} />}
</Sidebar.Content>
</Sidebar>
</SettingsProvider>
);
}
};

export default memo(AdminSidebar);
6 changes: 0 additions & 6 deletions apps/meteor/client/views/omnichannel/components/Field.js

This file was deleted.

6 changes: 6 additions & 0 deletions apps/meteor/client/views/omnichannel/components/Field.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Box } from '@rocket.chat/fuselage';
import React, { FC } from 'react';

const Field: FC = ({ children }) => <Box mb='x16'>{children}</Box>;

export default Field;
6 changes: 0 additions & 6 deletions apps/meteor/client/views/omnichannel/components/Label.js

This file was deleted.

6 changes: 6 additions & 0 deletions apps/meteor/client/views/omnichannel/components/Label.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Box } from '@rocket.chat/fuselage';
import React, { ComponentProps, FC } from 'react';

const Label: FC<ComponentProps<typeof Box>> = (props) => <Box mbe='x8' fontScale='p2m' color='default' {...props} />;

export default Label;

0 comments on commit c2bd911

Please sign in to comment.