import React from "react"; import { useSelector, useDispatch } from "react-redux"; import { Box, Button, Clock } from "grommet"; import { setPlugin, selectCore } from "./coreSlice"; import * as plugins from "./plugins"; function Core() { const coreState = useSelector(selectCore); const dispatch = useDispatch(); const plugin = plugins.default[coreState.plugin]; const props = { data: coreState.data, close: () => dispatch(setPlugin(false)) }; const dummyButtons = ["Maps", "Home Devices", "Phone"]; return <> {plugin ? plugin(props) : (