Skip to content

Commit

Permalink
fix(web): Email add-logo to brand page redirect (#5610)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChmaraX authored May 21, 2024
1 parent d5bb034 commit a8aa789
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import { ButtonRowContent } from './ButtonRowContent';
import { TextRowContent } from './TextRowContent';
import type { IForm, IFormStep, ITemplates } from '../formTypes';
import { useStepFormPath } from '../../hooks/useStepFormPath';
import { useFeatureFlag } from '../../../../hooks/useFeatureFlags';
import { FeatureFlagsKeysEnum } from '@novu/shared';
import { ROUTES } from '../../../../constants/routes.enum';

interface IStepEntityExtended extends IFormStep {
template: ITemplates & {
Expand All @@ -30,6 +33,7 @@ export function EmailMessageEditor({
branding: { color: string; logo: string } | undefined;
readonly: boolean;
}) {
const isInformationArchitectureEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_INFORMATION_ARCHITECTURE_ENABLED);
const methods = useFormContext<IFormExtended>();
const stepFormPath = useStepFormPath();
const contentBlocks = useFieldArray<IFormExtended, any, 'id' | 'type'>({
Expand Down Expand Up @@ -83,7 +87,7 @@ export function EmailMessageEditor({
}

function getBrandSettingsUrl(): string {
return '/brand';
return isInformationArchitectureEnabled ? ROUTES.BRAND_SETTINGS : ROUTES.BRAND;
}

return (
Expand Down

0 comments on commit a8aa789

Please sign in to comment.