diff --git a/apps/phone/src/common/hooks/useExternalApps.tsx b/apps/phone/src/common/hooks/useExternalApps.tsx index 146e50a28..87c303c73 100644 --- a/apps/phone/src/common/hooks/useExternalApps.tsx +++ b/apps/phone/src/common/hooks/useExternalApps.tsx @@ -19,7 +19,7 @@ const useExternalAppsAction = () => { const element = document.createElement('script'); element.src = url; - element.type = 'text/javascript'; + element.type = 'module'; element.async = true; document.head.appendChild(element); @@ -95,7 +95,7 @@ const useExternalAppsAction = () => { const configs = await Promise.all( externalApps.map(async (appName) => { - return appAlreadyLoaded(appName) ?? await generateAppConfig(appName); + return appAlreadyLoaded(appName) ?? (await generateAppConfig(appName)); }), ); diff --git a/apps/phone/src/os/apps/hooks/useApps.tsx b/apps/phone/src/os/apps/hooks/useApps.tsx index 95b4fc610..4f76671c3 100644 --- a/apps/phone/src/os/apps/hooks/useApps.tsx +++ b/apps/phone/src/os/apps/hooks/useApps.tsx @@ -6,11 +6,14 @@ import { SvgIconComponent } from '@mui/icons-material'; import { useTheme } from '@mui/material'; import { useSettingsValue } from '../../../apps/settings/hooks/useSettings'; import { IconSetObject } from '@typings/settings'; +import { useRecoilValue } from 'recoil'; +import { phoneState } from '@os/phone/hooks/state'; export const useApps = () => { const { icons } = useNotifications(); const theme = useTheme(); const curIconSet = useSettingsValue().iconSet.value as IconSetObject; + const externalApps = useRecoilValue(phoneState.extApps); const apps: IApp[] = useMemo(() => { return APPS.map((app) => { @@ -52,7 +55,10 @@ export const useApps = () => { }); }, [icons, curIconSet, theme]); - const allApps = useMemo(() => [...apps], [apps]); + const allApps = useMemo( + () => [...apps, ...externalApps.filter((app) => app)], + [apps, externalApps], + ); const getApp = useCallback( (id: string): IApp => { return allApps.find((a) => a.id === id) || null; diff --git a/apps/phone/src/os/new-notifications/components/NotificationBase.tsx b/apps/phone/src/os/new-notifications/components/NotificationBase.tsx index 87eb0c055..ef27facc9 100644 --- a/apps/phone/src/os/new-notifications/components/NotificationBase.tsx +++ b/apps/phone/src/os/new-notifications/components/NotificationBase.tsx @@ -38,8 +38,6 @@ const NotificationBase = forwardRef((prop console.warn('App does not have a notification icon'); } - console.log("app bg", app.backgroundColor) - return (