* Refactor and consolitdate store imports - Created a new index file in the core stores directory to export all stores from a single module. - Updated imports to use consolidated store exports. * Remove unnecessary import * Update imports * First steps to persist nodeDB * Use named exports * Change store import after merge * Persistent nodeDB initial work * Key mishmatch warning, new serialization handler * Minor copilot changes * Add NODEDB_RETENTION_NUM * Updated tests * Refactor PKI mismatch logic * Clear persisted db on reset * Only persist on featureFlag * Mock featureFlag in tests --------- Co-authored-by: philon- <philon-@users.noreply.github.com>
16 lines
387 B
TypeScript
16 lines
387 B
TypeScript
import { CurrentDeviceContext } from "@core/stores";
|
|
import type { ReactNode } from "react";
|
|
|
|
export interface DeviceWrapperProps {
|
|
children: ReactNode;
|
|
deviceId: number;
|
|
}
|
|
|
|
export const DeviceWrapper = ({ children, deviceId }: DeviceWrapperProps) => {
|
|
return (
|
|
<CurrentDeviceContext.Provider value={{ deviceId }}>
|
|
{children}
|
|
</CurrentDeviceContext.Provider>
|
|
);
|
|
};
|