-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ec6212
commit 3b7aece
Showing
13 changed files
with
344 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { | ||
generatePath, | ||
useNavigate, | ||
useParams, | ||
} from 'react-router-dom'; | ||
|
||
import routes from '#routes'; | ||
|
||
interface AlertDetailsParams { | ||
alertId: string | undefined; | ||
[key: string]: string | undefined; | ||
} | ||
|
||
// eslint-disable-next-line import/prefer-default-export | ||
export function Component() { | ||
const { alertId } = useParams<AlertDetailsParams>(); | ||
const navigate = useNavigate(); | ||
|
||
const alertDetailsLink = (alertId) ? ({ | ||
pathname: (generatePath( | ||
routes.alertDetails.absolutePath, | ||
{ alertId }, | ||
)), | ||
}) | ||
: routes.pageNotFound.path; | ||
|
||
if (alertDetailsLink) { | ||
navigate(alertDetailsLink); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
Component.displayName = 'AlertDetailsRedirect'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
generatePath, | ||
useNavigate, | ||
useParams, | ||
} from 'react-router-dom'; | ||
|
||
import routes from '#routes'; | ||
|
||
interface UnsubscribeParams { | ||
subscriptionId: string | undefined; | ||
token: string | undefined; | ||
[key: string]: string | undefined; | ||
} | ||
|
||
// eslint-disable-next-line import/prefer-default-export | ||
export function Component() { | ||
const { subscriptionId, token } = useParams<UnsubscribeParams>(); | ||
const navigate = useNavigate(); | ||
|
||
const UnsubscribeLink = (subscriptionId && token) ? ({ | ||
pathname: (generatePath(routes.unsubscribe.absolutePath, { subscriptionId, token })), | ||
}) | ||
: routes.pageNotFound.path; | ||
|
||
if (UnsubscribeLink) { | ||
navigate(UnsubscribeLink); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
Component.displayName = 'UnsubscribeRedirect'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ | ||
"namespace": "activation", | ||
"strings": { | ||
"activationSuccessMessage":"Your account has been successfully activated!", | ||
"goToLogin":"Go to Login", | ||
"activationFailMessage":"An error occurred during activation. Please try again." | ||
"activationSuccessMessage": "Your account has been successfully activated!", | ||
"goToLogin": "Go to Login", | ||
"activationFailMessage": "This account has already been activated." | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"namespace": "unsubscribe", | ||
"strings": { | ||
"unsubscriptionFailed": "Failed to unsubscribe. Please try again later.", | ||
"unsubscribeSuccessfully": "Subscription successfully deactivated! Redirecting to the homepage...", | ||
"unsubscribeConfirmHeading": "Unsubscribe", | ||
"unsubscribeConfirmMessage": "Are you sure you want to unsubscribe?" | ||
} | ||
} |
Oops, something went wrong.