mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-22 16:11:38 +03:00
Merge pull request #597 from kinode-dao/develop
fix: remove app store secure subdomain from links
This commit is contained in:
commit
4ffa5b5703
@ -9,7 +9,7 @@ const Header: React.FC = () => {
|
||||
<header className="app-header">
|
||||
<div className="header-left">
|
||||
<nav>
|
||||
<button onClick={() => window.location.href = '/'} className="home-button">
|
||||
<button onClick={() => window.location.href = window.location.origin.replace('//app-store-sys.', '//') + '/'} className="home-button">
|
||||
<FaHome />
|
||||
</button>
|
||||
<Link to={STORE_PATH} className={location.pathname === STORE_PATH ? 'active' : ''}>Apps</Link>
|
||||
|
@ -62,7 +62,7 @@ export default function AppPage() {
|
||||
if (app) {
|
||||
const launchUrl = getLaunchUrl(`${app.package_id.package_name}:${app.package_id.publisher_node}`);
|
||||
if (launchUrl) {
|
||||
window.location.href = launchUrl;
|
||||
window.location.href = window.location.origin.replace('//app-store-sys.', '//') + launchUrl;
|
||||
}
|
||||
}
|
||||
}, [app, getLaunchUrl]);
|
||||
|
@ -178,7 +178,7 @@ export default function DownloadPage() {
|
||||
|
||||
const handleLaunch = useCallback(() => {
|
||||
if (launchPath) {
|
||||
window.location.href = launchPath;
|
||||
window.location.href = window.location.origin.replace('//app-store-sys.', '//') + launchPath;
|
||||
}
|
||||
}, [launchPath]);
|
||||
|
||||
|
@ -77,12 +77,7 @@ function populate_contacts(contacts) {
|
||||
|
||||
document.getElementById('back-button').addEventListener('click', () => {
|
||||
// set page to `/` while also removing the subdomain
|
||||
const url = new URL(window.location.href);
|
||||
if (url.hostname.split('.')[0] === 'contacts-sys') {
|
||||
url.hostname = url.hostname.split('.').slice(1).join('.');
|
||||
}
|
||||
url.pathname = '/';
|
||||
window.location.href = url.toString();
|
||||
window.location.href = window.location.origin.replace('//contacts-sys.', '//') + '/'
|
||||
});
|
||||
|
||||
document.getElementById('add-contact').addEventListener('submit', (e) => {
|
||||
|
Loading…
Reference in New Issue
Block a user