Remove three old env variables (#2297)
* remove three old env variables IS_DATA_MODEL_SETTINGS_ENABLED IS_DEVELOPERS_SETTINGS_ENABLED FLEXIBLE_BACKEND_ENABLED * Fix database:reset script * Removing unused variable --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,10 +1,7 @@
|
||||
import { useCallback } from 'react';
|
||||
import { useMatch, useNavigate, useResolvedPath } from 'react-router-dom';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { useAuth } from '@/auth/hooks/useAuth';
|
||||
import { isDataModelSettingsEnabledState } from '@/client-config/states/isDataModelSettingsEnabled';
|
||||
import { isDevelopersSettingsEnabledState } from '@/client-config/states/isDevelopersSettingsEnabled';
|
||||
import { AppPath } from '@/types/AppPath';
|
||||
import {
|
||||
IconColorSwatch,
|
||||
@ -29,22 +26,6 @@ export const SettingsNavbar = () => {
|
||||
navigate(AppPath.SignIn);
|
||||
}, [signOut, navigate]);
|
||||
|
||||
const isDataModelSettingsEnabled = useRecoilValue(
|
||||
isDataModelSettingsEnabledState,
|
||||
);
|
||||
const isDevelopersSettingsEnabled = useRecoilValue(
|
||||
isDevelopersSettingsEnabledState,
|
||||
);
|
||||
|
||||
const isDataModelSettingsActive = !!useMatch({
|
||||
path: useResolvedPath('/settings/objects').pathname,
|
||||
end: false,
|
||||
});
|
||||
const isDevelopersSettingsActive = !!useMatch({
|
||||
path: useResolvedPath('/settings/developers/api-keys').pathname,
|
||||
end: true,
|
||||
});
|
||||
|
||||
return (
|
||||
<SubMenuNavbar backButtonTitle="Settings" displayVersion={true}>
|
||||
<NavTitle label="User" />
|
||||
@ -93,22 +74,30 @@ export const SettingsNavbar = () => {
|
||||
})
|
||||
}
|
||||
/>
|
||||
{isDataModelSettingsEnabled && (
|
||||
<NavItem
|
||||
label="Data model"
|
||||
to="/settings/objects"
|
||||
Icon={IconHierarchy2}
|
||||
active={isDataModelSettingsActive}
|
||||
/>
|
||||
)}
|
||||
{isDevelopersSettingsEnabled && (
|
||||
<NavItem
|
||||
label="Developers"
|
||||
to="/settings/developers/api-keys"
|
||||
Icon={IconRobot}
|
||||
active={isDevelopersSettingsActive}
|
||||
/>
|
||||
)}
|
||||
|
||||
<NavItem
|
||||
label="Data model"
|
||||
to="/settings/objects"
|
||||
Icon={IconHierarchy2}
|
||||
active={
|
||||
!!useMatch({
|
||||
path: useResolvedPath('/settings/objects').pathname,
|
||||
end: false,
|
||||
})
|
||||
}
|
||||
/>
|
||||
|
||||
<NavItem
|
||||
label="Developers"
|
||||
to="/settings/developers/api-keys"
|
||||
Icon={IconRobot}
|
||||
active={
|
||||
!!useMatch({
|
||||
path: useResolvedPath('/settings/developers/api-keys').pathname,
|
||||
end: true,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<NavTitle label="Other" />
|
||||
<NavItem label="Logout" onClick={handleLogout} Icon={IconLogout} />
|
||||
</SubMenuNavbar>
|
||||
|
||||
Reference in New Issue
Block a user