mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
fix(Settings): check for profile.auth in subscribeCalendarOnClick
This commit is contained in:
parent
3c517f6a32
commit
0a2ad7b6aa
1 changed files with 3 additions and 1 deletions
|
|
@ -103,6 +103,8 @@ const Settings = () => {
|
|||
}
|
||||
}, [isTraktAuthenticated, profile.auth]);
|
||||
const subscribeCalendarOnClick = React.useCallback(() => {
|
||||
if (!profile.auth) return;
|
||||
|
||||
const protocol = platform.name === 'ios' ? 'webcal' : 'https';
|
||||
const url = `${protocol}://www.strem.io/calendar/${profile.auth.user._id}.ics`;
|
||||
platform.openExternal(url);
|
||||
|
|
@ -112,7 +114,7 @@ const Settings = () => {
|
|||
timeout: 25000
|
||||
});
|
||||
// Stremio 4 emits not documented event subscribeCalendar
|
||||
}, [profile.auth.user._id]);
|
||||
}, [profile.auth]);
|
||||
const exportDataOnClick = React.useCallback(() => {
|
||||
loadDataExport();
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Reference in a new issue