mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
Fix redirect
The odysee button change came with passing around the secondary part of the URL instead of the whole thing. Unfortunately, this change requires functions to be a little smarter and resolve with the domain lookup. This was missed for redirects.
This commit is contained in:
parent
a0963db2b4
commit
410a87710b
1 changed files with 3 additions and 2 deletions
|
@ -112,8 +112,9 @@ const handle = (url: URL | Location) => handleURLChange(url, {
|
|||
render(<WatchOnLbryButton url={url} redirect={redirect} />, mountPoint);
|
||||
},
|
||||
onRedirect({ redirect, url }) {
|
||||
if (redirect === 'app') return openApp(url);
|
||||
location.replace(url);
|
||||
const domain = redirectDomains[redirect];
|
||||
if (redirect === 'app') return openApp(domain.prefix + url);
|
||||
location.replace(domain.prefix + url);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue