mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-16 12:49:56 +03:00
14 lines
417 B
TypeScript
14 lines
417 B
TypeScript
import React from 'react';
|
|
import { WiFiNetwork } from './types';
|
|
|
|
export interface NetworkConnectionContextValue {
|
|
selectedNetwork?: WiFiNetwork;
|
|
selectNetwork: (network: WiFiNetwork) => void;
|
|
deselectNetwork: () => void;
|
|
}
|
|
|
|
const NetworkConnectionContextDefaultValue = {} as NetworkConnectionContextValue;
|
|
export const NetworkConnectionContext = React.createContext(
|
|
NetworkConnectionContextDefaultValue
|
|
);
|