fix: add platform abstraction for deeplink
This was crashing App.tsx due to the deep link listener calling methods on window which do not exist.
This commit is contained in:
@@ -56,10 +56,10 @@ function DeepLinkNavigationListener() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
window.electronDeepLink.getPending().then((path) => {
|
||||
platform.deepLink.getPending().then((path) => {
|
||||
if (path) navigate(path);
|
||||
});
|
||||
return window.electronDeepLink.onNavigate((path) => navigate(path));
|
||||
return platform.deepLink.onNavigate((path) => navigate(path));
|
||||
}, [navigate]);
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user