Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync to Sprint 24 Deploy: PM-698 CA Found Pet Report Redirect #284

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion blocks/found-pet-report/found-pet-report.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { jsx, loadScript } from '../../scripts/scripts.js';
import { getConfigValue } from '../../scripts/configs.js';
import { isCanada } from '../../scripts/lib-franklin.js';

async function executeSubmit(block, requestBody) {
const reportLostEndpoint = await getConfigValue('found-pet-endpoint');
Expand All @@ -15,7 +16,8 @@ async function executeSubmit(block, requestBody) {
});

if (response.ok) {
window.location.href = '/lost-pet-protection/report-lost-found-pet/thank-you';
const urlPath = isCanada ? '/ca/lost-pet-protection/report-lost-found-pet/thank-you' : '/lost-pet-protection/report-lost-found-pet/thank-you';
window.location.href = urlPath;
} else {
form.classList.add('submission-message');
form.innerHTML = 'There was an error with your submission. Please try again.';
Expand Down
Loading