Re-engineer UI in TypeScript (#89)
* Re-engineer UI in TypeScript * Switch to named imports where possible * Restructure file system layout * Update depencencies * Update README.md * Change explicit colors for better support for dark theme
This commit is contained in:
13
interface/src/wifi/WiFiConnectionContext.tsx
Normal file
13
interface/src/wifi/WiFiConnectionContext.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { WiFiNetwork } from './types';
|
||||
|
||||
export interface WiFiConnectionContext {
|
||||
selectedNetwork?: WiFiNetwork;
|
||||
selectNetwork: (network: WiFiNetwork) => void;
|
||||
deselectNetwork: () => void;
|
||||
}
|
||||
|
||||
const WiFiConnectionContextDefaultValue = {} as WiFiConnectionContext
|
||||
export const WiFiConnectionContext = React.createContext(
|
||||
WiFiConnectionContextDefaultValue
|
||||
);
|
||||
Reference in New Issue
Block a user