mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
20 lines
450 B
TypeScript
20 lines
450 B
TypeScript
import { ReactNode } from 'react';
|
|
import { FSContext, type FSContextType } from '@/contexts/FSContext';
|
|
import { JSRuntimeFS } from '@/lib/JSRuntime';
|
|
|
|
interface FSProviderProps {
|
|
children: ReactNode;
|
|
fs: JSRuntimeFS;
|
|
}
|
|
|
|
export function FSProvider({ children, fs }: FSProviderProps) {
|
|
const contextValue: FSContextType = {
|
|
fs,
|
|
};
|
|
|
|
return (
|
|
<FSContext.Provider value={contextValue}>
|
|
{children}
|
|
</FSContext.Provider>
|
|
);
|
|
} |