3865-Add-Integrations (#3870)

* initial commit setup

* ui done

* added links

* changed brand logos

* Twenty logo fix

* Windmill logo fix

* Fix typo

* Add feature flag

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Kanav Arora
2024-02-14 03:41:05 +05:30
committed by GitHub
parent 15a5fec545
commit 7b88e5bdaf
21 changed files with 356 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import { useMatch, useNavigate, useResolvedPath } from 'react-router-dom';
import { useAuth } from '@/auth/hooks/useAuth';
import { AppPath } from '@/types/AppPath';
import {
IconApps,
IconAt,
IconCalendarEvent,
IconColorSwatch,
@ -31,6 +32,12 @@ export const SettingsNavigationDrawerItems = () => {
}, [signOut, navigate]);
const isMessagingEnabled = useIsFeatureEnabled('IS_MESSAGING_ENABLED');
const isIntegrationsEnabled = useIsFeatureEnabled('IS_INTEGRATIONS_ENABLED');
const isIntegrationsItemActive = !!useMatch({
path: useResolvedPath('/settings/integrations').pathname,
end: true,
});
const isAccountsItemActive = !!useMatch({
path: useResolvedPath('/settings/accounts').pathname,
end: true,
@ -137,6 +144,14 @@ export const SettingsNavigationDrawerItems = () => {
})
}
/>
{isIntegrationsEnabled && (
<NavigationDrawerItem
label="Integrations"
to="/settings/integrations"
Icon={IconApps}
active={isIntegrationsItemActive}
/>
)}
</NavigationDrawerSection>
<NavigationDrawerSection>

View File

@ -17,6 +17,7 @@ export enum SettingsPath {
Developers = '',
DevelopersNewApiKey = 'api-keys/new',
DevelopersApiKeyDetail = 'api-keys/:apiKeyId',
Integrations = 'integrations',
DevelopersNewWebhook = 'webhooks/new',
DevelopersNewWebhookDetail = 'webhooks/:webhookId',
}

View File

@ -16,6 +16,7 @@ export {
IconAt,
IconBaselineDensitySmall,
IconBell,
IconBolt,
IconBox,
IconBrandGithub,
IconBrandGoogle,

View File

@ -1,4 +1,5 @@
export type FeatureFlagKey =
| 'IS_MESSAGING_ENABLED'
| 'IS_INTEGRATIONS_ENABLED'
| 'IS_QUICK_ACTIONS_ENABLED'
| 'IS_NEW_RECORD_BOARD_ENABLED';