fix: redirects

This commit is contained in:
Naomi Carrigan 2024-08-24 10:16:15 -07:00
parent 40c9d561cc
commit a91a2cce5d
Signed by: naomi
SSH Key Fingerprint: SHA256:rca1iUI2OhAM6n4FIUaFcZcicmri0jgocqKiTTAfrt8

View File

@ -17,23 +17,24 @@ to make our things work.
window.location.replace('/community/coc');
return;
}
if (hash === "#/coc") {
window.location.replace('/community/coc');
if (hash === "#/contributing") {
window.location.replace('/dev/contributing');
return;
}
if (hash === "#/coc") {
window.location.replace('/community/coc');
if (hash === "#/privacy") {
window.location.replace('/legal/privacy');
return;
}
if (hash === "#/coc") {
window.location.replace('/community/coc');
if (hash === "#/terms") {
window.location.replace('/legal/terms');
return;
}
if (hash.startsWith('#/')) {
const [newPath, newHash] = hash.slice(2).split('?id=');
window.location.replace(
newHash ? `/${newPath}/#${newHash}` : `/${newPath}`
);
if (hash === "#/security") {
window.location.replace('/legal/security');
return;
}
if (hash === "#/contact") {
window.location.replace('/about/contact');
return;
}
window.location.replace('/intro');