Show app logo and name in workflow step side panel header (#21689)
Show app logo and name in workflow step side panel header ## Before <img width="798" height="106" alt="CleanShot 2026-06-16 at 17 59 39@2x" src="https://github.com/user-attachments/assets/a8881d1c-355c-4e3a-9379-0c3a7cfbf42f" /> ## After <img width="800" height="102" alt="CleanShot 2026-06-16 at 18 05 27@2x" src="https://github.com/user-attachments/assets/43820d1a-6445-42d8-8f45-963e8741cbb7" /> <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/21689?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
import { useApplicationChipData } from '@/applications/hooks/useApplicationChipData';
|
||||
import { useIsThirdPartyApplication } from '@/applications/hooks/useIsThirdPartyApplication';
|
||||
import { logicFunctionsSelector } from '@/logic-functions/states/logicFunctionsSelector';
|
||||
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
type LogicFunctionThirdPartyApplicationInformation = {
|
||||
applicationId: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export const useLogicFunctionThirdPartyApplicationInformation = (
|
||||
logicFunctionId?: string,
|
||||
): LogicFunctionThirdPartyApplicationInformation | undefined => {
|
||||
const logicFunctions = useAtomStateValue(logicFunctionsSelector);
|
||||
|
||||
const applicationId = isDefined(logicFunctionId)
|
||||
? logicFunctions.find(
|
||||
(logicFunction) => logicFunction.id === logicFunctionId,
|
||||
)?.applicationId
|
||||
: undefined;
|
||||
|
||||
const isThirdPartyApplication = useIsThirdPartyApplication(applicationId);
|
||||
|
||||
const { applicationChipData } = useApplicationChipData({ applicationId });
|
||||
|
||||
if (!isThirdPartyApplication || !isDefined(applicationId)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
applicationId,
|
||||
name: applicationChipData.name,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user