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

Replace hardcoded subpath with window.location.pathname #618

Merged
merged 1 commit into from
Sep 22, 2023
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
6 changes: 3 additions & 3 deletions src/application/ApplicationThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
query,
parameters,
1,
() => {},
() => { },
(records) => validateConnection(records)
);
} catch (e) {
Expand Down Expand Up @@ -214,13 +214,13 @@
const dashboardDatabase = urlParams.get('dashboardDatabase');
if (urlParams.get('credentials')) {
const connection = decodeURIComponent(urlParams.get('credentials'));
const protocol = connection.split('://')[0];

Check warning on line 217 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const username = connection.split('://')[1].split(':')[0];

Check warning on line 218 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const password = connection.split('://')[1].split(':')[1].split('@')[0];

Check warning on line 219 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring

const database = connection.split('@')[1].split(':')[0];

Check warning on line 221 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const url = connection.split('@')[1].split(':')[1];

Check warning on line 222 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const port = connection.split('@')[1].split(':')[2];

Check warning on line 223 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
if (url == password) {
// Special case where a connect link is generated without a password.
// Here, the format is parsed incorrectly and we open the connection window instead.
Expand Down Expand Up @@ -254,7 +254,7 @@
dispatch(onConfirmLoadSharedDashboardThunk());
}

window.history.pushState({}, document.title, '/');
window.history.pushState({}, document.title, window.location.pathname);
} else {
dispatch(setConnectionModalOpen(false));
// dispatch(setWelcomeScreenOpen(false));
Expand All @@ -273,7 +273,7 @@
false
)
);
window.history.pushState({}, document.title, '/');
window.history.pushState({}, document.title, window.location.pathname);
}
} else {
// dispatch(resetShareDetails());
Expand Down Expand Up @@ -504,7 +504,7 @@
dispatch(initializeApplicationAsEditorThunk(config, paramsToSetAfterConnecting));
}
} catch (e) {
console.log(e);

Check warning on line 507 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Unexpected console statement
dispatch(setWelcomeScreenOpen(false));
dispatch(
createNotificationThunk(
Expand Down
Loading