mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 17:59:53 +03:00
15 lines
412 B
TypeScript
15 lines
412 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
|
|
);
|