mirror of
https://github.com/meshtastic/web.git
synced 2026-01-19 21:08:16 -05:00
18 lines
437 B
TypeScript
18 lines
437 B
TypeScript
import { DeviceContext } from "@core/stores/deviceStore.js";
|
|
import type { Device } from "@core/stores/deviceStore.js";
|
|
import type { ReactNode } from "react";
|
|
|
|
export interface DeviceWrapperProps {
|
|
children: ReactNode;
|
|
device?: Device;
|
|
}
|
|
|
|
export const DeviceWrapper = ({
|
|
children,
|
|
device,
|
|
}: DeviceWrapperProps): JSX.Element => {
|
|
return (
|
|
<DeviceContext.Provider value={device}>{children}</DeviceContext.Provider>
|
|
);
|
|
};
|