feat: desktop version

This commit is contained in:
Morten Olsen
2023-06-20 12:17:40 +02:00
parent fec30cc430
commit 6477b56ade
17 changed files with 2337 additions and 65 deletions

View File

@@ -1,4 +1,4 @@
import { DashboardProvider, Widget } from '@refocus/sdk';
import { DashboardProvider, Widget, Notification } from '@refocus/sdk';
import { UIProvider } from './theme/provider';
import { useCallback, useMemo } from 'react';
import { GithubLogin } from './github';
@@ -8,9 +8,14 @@ import { SlackLogin } from './slack';
type FocusProviderProps = {
children: React.ReactNode;
widgets: Widget<any>[];
onNotificationsUpdate?: (notifications: Notification[]) => void;
};
const FocusProvider: React.FC<FocusProviderProps> = ({ children, widgets }) => {
const FocusProvider: React.FC<FocusProviderProps> = ({
children,
widgets,
onNotificationsUpdate,
}) => {
const save = useCallback((data: any) => {
localStorage.setItem('boards', JSON.stringify(data));
}, []);
@@ -42,6 +47,7 @@ const FocusProvider: React.FC<FocusProviderProps> = ({ children, widgets }) => {
save={save}
widgets={widgets}
logins={logins}
onNotificationsUpdate={onNotificationsUpdate}
>
{children}
</DashboardProvider>