mirror of
https://github.com/openziti/zrok.git
synced 2025-01-03 04:29:19 +01:00
extraneous store cruft (#809)
This commit is contained in:
parent
6476d68d4f
commit
686443c921
@ -1,20 +1,16 @@
|
||||
import {create} from "zustand";
|
||||
import {Environment, Metrics} from "../api";
|
||||
import {Environment} from "../api";
|
||||
|
||||
type State = {
|
||||
account: Metrics;
|
||||
environments: Array<Environment>;
|
||||
};
|
||||
|
||||
type Action = {
|
||||
updateAccount: (metrics: State['account']) => void
|
||||
updateEnvironments: (environments: State['environments']) => void
|
||||
};
|
||||
|
||||
const useMetricsStore = create<State & Action>((set) => ({
|
||||
account: null,
|
||||
environments: new Array<Environment>(),
|
||||
updateAccount: (metrics) => set({account: metrics}),
|
||||
updateEnvironments: (environments) => set({environments: environments}),
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user