mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
13 lines
408 B
TypeScript
13 lines
408 B
TypeScript
import { createContext } from 'react';
|
|
|
|
import type { WiFiNetwork } from 'types';
|
|
|
|
export interface WiFiConnectionContextValue {
|
|
selectedNetwork?: WiFiNetwork;
|
|
selectNetwork: (network: WiFiNetwork) => void;
|
|
deselectNetwork: () => void;
|
|
}
|
|
|
|
const WiFiConnectionContextDefaultValue = {} as WiFiConnectionContextValue;
|
|
export const WiFiConnectionContext = createContext(WiFiConnectionContextDefaultValue);
|