mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-28 23:48:31 +02:00
fix netlify redirection
This commit is contained in:
@@ -67,6 +67,46 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
{{ if .IsHome }}
|
||||
<script>
|
||||
// Check that current url contains `?token=...` parameter
|
||||
// And if so, redirec to `/admin?token=...` page
|
||||
|
||||
// Get the current URL
|
||||
const url = window.location.href;
|
||||
|
||||
// Use URLSearchParams to parse the query parameters
|
||||
const params = new URLSearchParams(url.split('#')[1]);
|
||||
|
||||
// Check if the 'token' parameter is present
|
||||
if (params.has('recovery_token')) {
|
||||
// Get the value of the 'token' parameter
|
||||
const token = params.get('recovery_token');
|
||||
// Redirect to the '/admin' page with the same 'token' parameter
|
||||
window.location.href = '/admin/#recovery_token=' + token;
|
||||
}
|
||||
|
||||
// Check if the 'token' parameter is present
|
||||
if (params.has('invite_token')) {
|
||||
// Get the value of the 'token' parameter
|
||||
const token = params.get('invite_token');
|
||||
// Redirect to the '/admin' page with the same 'token' parameter
|
||||
window.location.href = '/admin/#invite_token=' + token;
|
||||
}
|
||||
|
||||
// Check if the 'token' parameter is present
|
||||
if (params.has('confirmation_token')) {
|
||||
// Get the value of the 'token' parameter
|
||||
const token = params.get('confirmation_token');
|
||||
// Redirect to the '/admin' page with the same 'token' parameter
|
||||
window.location.href = '/admin/#confirmation_token=' + token;
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
{{ if not .IsHome }}
|
||||
|
||||
<!-- MathJax support -->
|
||||
|
||||
Reference in New Issue
Block a user