2020-02-09 10:21:13 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { WiFiNetwork } from './types';
|
|
|
|
|
2021-01-16 18:08:41 +00:00
|
|
|
export interface WiFiConnectionContextValue {
|
2020-02-09 10:21:13 +00:00
|
|
|
selectedNetwork?: WiFiNetwork;
|
|
|
|
selectNetwork: (network: WiFiNetwork) => void;
|
|
|
|
deselectNetwork: () => void;
|
|
|
|
}
|
|
|
|
|
2021-01-16 18:08:41 +00:00
|
|
|
const WiFiConnectionContextDefaultValue = {} as WiFiConnectionContextValue
|
2020-02-09 10:21:13 +00:00
|
|
|
export const WiFiConnectionContext = React.createContext(
|
|
|
|
WiFiConnectionContextDefaultValue
|
|
|
|
);
|