Skip to content

Commit

Permalink
supportUrl to contactUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcorner committed Feb 22, 2024
1 parent df19d5b commit 61b7a4b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/LoadErrorMessage/LoadErrorMessage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const GeneralError = {
image: "virto-head-scratching",
message:
"Oops! Something went wrong on our end 😓 Our team is actively addressing it and working to resolve the issue. Please try again later.",
supportUrl: "https://support.virto.com",
contactUrl: "https://support.virto.com",
title: "Something is not right!"
},
render: Template
Expand Down
6 changes: 3 additions & 3 deletions src/LoadErrorMessage/LoadErrorMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const LoadErrorMessage = ({
message,
title,
image = "virto-thinking",
supportUrl,
contactUrl,
onButtonClick
}: LoadErrorMessageProps) => {
// State to track whether the error details are visible or not
Expand Down Expand Up @@ -132,8 +132,8 @@ const LoadErrorMessage = ({
}
>
If this persists, contact {/* Render the contact team link */}
{supportUrl ? (
<Link href={supportUrl} target="_blank" rel="noopener noreferrer">
{contactUrl ? (
<Link href={contactUrl} target="_blank" rel="noopener noreferrer">
{contactTeam}
</Link>
) : (
Expand Down
36 changes: 18 additions & 18 deletions src/LoadErrorMessage/LoadErrorMessage.types.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
export type LoadErrorMessageProps = {
/**
* Whether to show the VirtoThinking SVG or not.
* The text to display on the action button (optional).
*/
image?:
| "none"
| "virto-thinking"
| "virto-shrugging"
| "virto-head-scratching";
actionButtonText?: string;
/**
* The title of the error message.
* The team to contact if the error persists.
*/
title: string;
contactTeam?: "none" | "Support" | "Customer Service";
/**
* The main message of the error message.
* The URL to the support page (optional).
*/
message: string;
contactUrl?: string;
/**
* The details of the error message (optional).
*/
errorDetails?: string;
/**
* The team to contact if the error persists.
*/
contactTeam?: "none" | "Support" | "Customer Service";
/**
* The URL to the support page (optional).
* Whether to show the VirtoThinking SVG or not.
*/
supportUrl?: string;
image?:
| "none"
| "virto-thinking"
| "virto-shrugging"
| "virto-head-scratching";
/**
* The text to display on the action button (optional).
* The main message of the error message.
*/
actionButtonText?: string;
message: string;
/**
* The function to call when the action button is clicked (optional).
*/
onButtonClick?: () => void;
/**
* The title of the error message.
*/
title: string;
};

0 comments on commit 61b7a4b

Please sign in to comment.