mirror of
https://github.com/lingble/twenty.git
synced 2025-11-01 05:07:56 +00:00
## Description - This PR fix #7012 - It changes the logic behind the rendering of `SettingsPageContainer` component. Now, the component is only rendered when the page content is not blank. ## Changes | Before | After | |--------|--------| |  |  | <details><summary>Details</summary> <p> This change aligns the behavior of the settings page with the existing logic found on the `/rockets` page <img src="https://github.com/user-attachments/assets/d2b80fbc-83e4-4823-a708-6775e19a153a"/> </p> </details> Co-authored-by: Charles Bochet <charles@twenty.com>
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { SettingsServerlessFunctionsTable } from '@/settings/serverless-functions/components/SettingsServerlessFunctionsTable';
|
|
import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
|
|
import { SettingsPath } from '@/types/SettingsPath';
|
|
import { Button } from '@/ui/input/button/components/Button';
|
|
import { SubMenuTopBarContainer } from '@/ui/layout/page/SubMenuTopBarContainer';
|
|
import { Section } from '@/ui/layout/section/components/Section';
|
|
import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink';
|
|
import { IconFunction, IconPlus } from 'twenty-ui';
|
|
|
|
export const SettingsServerlessFunctions = () => {
|
|
return (
|
|
<SubMenuTopBarContainer
|
|
Icon={IconFunction}
|
|
title="Functions"
|
|
actionButton={
|
|
<UndecoratedLink
|
|
to={getSettingsPagePath(SettingsPath.NewServerlessFunction)}
|
|
>
|
|
<Button
|
|
Icon={IconPlus}
|
|
title="New Function"
|
|
accent="blue"
|
|
size="small"
|
|
/>
|
|
</UndecoratedLink>
|
|
}
|
|
links={[
|
|
{
|
|
children: 'Workspace',
|
|
href: getSettingsPagePath(SettingsPath.Workspace),
|
|
},
|
|
{
|
|
children: 'Functions',
|
|
},
|
|
]}
|
|
>
|
|
<Section>
|
|
<SettingsServerlessFunctionsTable />
|
|
</Section>
|
|
</SubMenuTopBarContainer>
|
|
);
|
|
};
|