Update dependents to use new exposed service
This commit is contained in:
1 parent
dfbf32fe43
commit
3993c12701
5 files changed
+12
-25
No files matched your search
@@ -7,7 +7,7 @@ import {
|
||||
|
||||
function LayoutSelector() {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [viewportGridState, dispatch] = useViewportGrid();
|
||||
const [viewportGridState, viewportGridService] = useViewportGrid();
|
||||
|
||||
useEffect(() => {
|
||||
function closeOnOutsideClick() {
|
||||
@@ -35,13 +35,7 @@ function LayoutSelector() {
|
||||
DropdownContent !== null && (
|
||||
<DropdownContent
|
||||
onSelection={({ numRows, numCols }) => {
|
||||
dispatch({
|
||||
type: 'SET_LAYOUT',
|
||||
payload: {
|
||||
numCols,
|
||||
numRows,
|
||||
},
|
||||
});
|
||||
viewportGridService.setLayout({ numCols, numRows });
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user