diff --git a/packages/grafnode-components/src/components/Sidebar/MenuBar/index.js b/packages/grafnode-components/src/components/Sidebar/MenuBar/index.js index b43707651..6f0906d3a 100644 --- a/packages/grafnode-components/src/components/Sidebar/MenuBar/index.js +++ b/packages/grafnode-components/src/components/Sidebar/MenuBar/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import { IconCode, IconStack, IconGitPullRequest, IconUser, IconUsers, IconSettings, IconLayoutGrid } from '@tabler/icons'; +import { IconCode, IconStack, IconGitPullRequest, IconUser, IconUsers, IconSettings, IconLayoutGrid, IconBuilding } from '@tabler/icons'; import StyledWrapper from './StyledWrapper'; const MenuBar = () => { @@ -23,6 +23,10 @@ const MenuBar = () => {
+ {/* Teams Icon */} + {/*
+ +
*/}
diff --git a/packages/grafnode-run/src/providers/Hotkeys/index.js b/packages/grafnode-run/src/providers/Hotkeys/index.js index fc3e96365..ac703bad1 100644 --- a/packages/grafnode-run/src/providers/Hotkeys/index.js +++ b/packages/grafnode-run/src/providers/Hotkeys/index.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import React, { useEffect } from 'react'; import Mousetrap from 'mousetrap'; export const HotkeysContext = React.createContext(); @@ -17,7 +17,7 @@ export const HotkeysProvider = props => { }, []); return ( - + {props.children} ); diff --git a/packages/grafnode-run/src/providers/Store/index.js b/packages/grafnode-run/src/providers/Store/index.js index d37a69043..fef77e001 100644 --- a/packages/grafnode-run/src/providers/Store/index.js +++ b/packages/grafnode-run/src/providers/Store/index.js @@ -1,12 +1,11 @@ import React, { useEffect, useContext, useReducer, createContext } from 'react'; import reducer from './reducer'; +import useIdb from './useIdb'; import { sendRequest } from '../../network'; import { nanoid } from 'nanoid'; export const StoreContext = createContext(); -const tabId1 = nanoid(); - const collection = { "id": nanoid(), "name": "spacex", @@ -112,6 +111,7 @@ const collection2 = { }; const initialState = { + idbConnection: null, collections: [collection, collection2], activeRequestTabId: null, requestQueuedToSend: null, @@ -132,6 +132,8 @@ export const StoreProvider = props => { } }, [state.requestQueuedToSend]); + useIdb(dispatch); + return ; }; diff --git a/packages/grafnode-run/src/providers/Store/reducer.js b/packages/grafnode-run/src/providers/Store/reducer.js index a520dfbbd..353ef3fc9 100644 --- a/packages/grafnode-run/src/providers/Store/reducer.js +++ b/packages/grafnode-run/src/providers/Store/reducer.js @@ -15,6 +15,14 @@ import { const reducer = (state, action) => { switch (action.type) { + case actions.IDB_CONNECTION_READY: { + return produce(state, (draft) => { + draft.idbConnection = action.connection; + + console.log("here"); + }); + } + case actions.SIDEBAR_COLLECTION_CLICK: { return produce(state, (draft) => { const collection = find(draft.collections, (c) => c.id === action.id);