fix: add missing LayoutRenderingProvider in SettingsApplicationCustomTab (#19679)
## Summary - `SettingsApplicationCustomTab` renders `FrontComponentRenderer` which calls `useFrontComponentExecutionContext` → `useLayoutRenderingContext()`, but the settings page never provided a `LayoutRenderingProvider` - Every other render site (side panel, command menu, record pages) wraps `FrontComponentRenderer` with this provider — it was just missed here - Opening the "Custom" tab in Settings → Applications crashes with: `LayoutRenderingContext Context not found` - Fix: wrap with `LayoutRenderingProvider` using `DASHBOARD` layout type and no target record, matching the pattern used in `SidePanelFrontComponentPage` ## Test plan - [ ] Open Settings → Applications → any app with a custom settings tab - [ ] Click the "Custom" tab — should render the front component without crashing 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+7
-1
@@ -18,11 +18,13 @@ import { FindOneFrontComponentDocument } from '~/generated-metadata/graphql';
|
||||
type FrontComponentRendererProps = {
|
||||
frontComponentId: string;
|
||||
commandMenuItemId?: string;
|
||||
recordId?: string;
|
||||
};
|
||||
|
||||
export const FrontComponentRenderer = ({
|
||||
frontComponentId,
|
||||
commandMenuItemId,
|
||||
recordId,
|
||||
}: FrontComponentRendererProps) => {
|
||||
const { colorScheme } = useContext(ThemeContext);
|
||||
const { enqueueErrorSnackBar } = useSnackBar();
|
||||
@@ -33,7 +35,11 @@ export const FrontComponentRenderer = ({
|
||||
);
|
||||
|
||||
const { executionContext, frontComponentHostCommunicationApi } =
|
||||
useFrontComponentExecutionContext({ frontComponentId, commandMenuItemId });
|
||||
useFrontComponentExecutionContext({
|
||||
frontComponentId,
|
||||
commandMenuItemId,
|
||||
recordId,
|
||||
});
|
||||
|
||||
const handleError = useCallback(
|
||||
(error?: Error) => {
|
||||
|
||||
Reference in New Issue
Block a user