Skip to content

Commit

Permalink
refactor(root): update after pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
djabarovgeorge committed Jan 9, 2025
1 parent 525ff63 commit de580e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ const LIQUID_CONFIG = {
greedy: false,
catchAllErrors: true,
} as const;
const DOT_ANNOTATION_MARKDOWN_HREF =
// eslint-disable-next-line max-len
'<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_accessors#dot_notation" target="_blank" rel="noopener noreferrer" style="text-decoration: underline">dot notation</a>';

export type Variable = {
/**
Expand Down Expand Up @@ -168,7 +165,7 @@ function extractProps(template: any): { valid: boolean; props: string[]; error?:
return {
valid: false,
props: [],
error: `<span>Invalid variable name containing whitespaces. Variables must follow the ${DOT_ANNOTATION_MARKDOWN_HREF}</span>`,
error: 'Invalid variable name containing whitespaces. Variables must follow the dot notation',
};
}

Expand All @@ -191,8 +188,7 @@ function extractProps(template: any): { valid: boolean; props: string[]; error?:
return {
valid: false,
props: [],
// eslint-disable-next-line max-len
error: `<span>Invalid variable name missing namespace. Variables must follow the ${DOT_ANNOTATION_MARKDOWN_HREF} (e.g. payload.${validProps[0]})</span>`,
error: `Invalid variable name missing namespace. Variables must follow the dot notation (e.g. payload.${validProps[0]})`,
};
}

Expand Down
4 changes: 1 addition & 3 deletions apps/dashboard/src/components/primitives/form/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ const FormMessagePure = React.forwardRef<
{...props}
>
<span>{error ? <RiErrorWarningFill className="size-4" /> : <RiInformationFill className="size-4" />}</span>
<span className="mt-[1px] text-xs leading-4">
{typeof body === 'string' ? <span dangerouslySetInnerHTML={{ __html: body }} /> : body}
</span>
<span className="mt-[1px] text-xs leading-4">{body}</span>
</p>
);
});
Expand Down

0 comments on commit de580e5

Please sign in to comment.