mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Adapt FS before passing it to FSProvider
This commit is contained in:
1 parent
a65b88a90b
commit
53eebe3e73
3 files changed
+7
-6
No files matched your search
@@ -1,16 +1,15 @@
|
||||
import { ReactNode } from 'react';
|
||||
import type LightningFS from '@isomorphic-git/lightning-fs';
|
||||
import { FSContext, type FSContextType } from '@/contexts/FSContext';
|
||||
import { LightningFSAdapter } from '@/lib/LightningFSAdapter';
|
||||
import { JSRuntimeFS } from '@/lib/JSRuntime';
|
||||
|
||||
interface FSProviderProps {
|
||||
children: ReactNode;
|
||||
fs: LightningFS.PromisifiedFS;
|
||||
fs: JSRuntimeFS;
|
||||
}
|
||||
|
||||
export function FSProvider({ children, fs }: FSProviderProps) {
|
||||
const contextValue: FSContextType = {
|
||||
fs: new LightningFSAdapter(fs)
|
||||
fs,
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user