mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Upgrade to Electron 14.2.4 (#4625)
Co-authored-by: Sebastian Malton <sebastian@malton.name> Co-authored-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
58 files changed
+545
-418
No files matched your search
@@ -8,3 +8,4 @@
|
||||
export * from "./useOnUnmount";
|
||||
export * from "./useInterval";
|
||||
export * from "./useMutationObserver";
|
||||
export * from "./use-toggle";
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { useState } from "react";
|
||||
|
||||
export function useToggle(initial: boolean): [value: boolean, toggle: () => void] {
|
||||
const [val, setVal] = useState(initial);
|
||||
|
||||
return [val, () => setVal(!val)];
|
||||
}
|
||||
Reference in new issue
Block a user