11import React from 'react'
22import { Page } from '../src/index.js'
33
4- import { Source , createHttpFileSystem , getSource } from '../src/index.ts'
4+ import { getHttpSource } from '../src/index.ts'
55export interface Navigation {
66 col ?: number
77 row ?: number
@@ -15,10 +15,6 @@ function getNumberParam(search: URLSearchParams, key: string): number | undefine
1515 return number
1616}
1717
18- const fileSystems = [
19- createHttpFileSystem ( ) ,
20- ]
21-
2218export default function App ( ) {
2319 const search = new URLSearchParams ( location . search )
2420 const url = search . get ( 'url' )
@@ -31,20 +27,13 @@ export default function App() {
3127 const row = getNumberParam ( search , 'row' )
3228 const col = getNumberParam ( search , 'col' )
3329
34- let source : Source | undefined = undefined
35- for ( const fileSystem of fileSystems ) {
36- const fsSource = getSource ( url , fileSystem )
37- if ( fsSource ) {
38- source = fsSource
39- break
40- }
41- }
30+ const source = getHttpSource ( url )
4231
4332 if ( ! source ) {
4433 return < div > Could not load a data source. You have to pass a valid source in the url, eg: < a href = { defaultUrl } > { defaultUrl } </ a > .</ div >
4534 }
4635 return < Page source = { source } navigation = { { row, col } } config = { {
47- slidePanel : { minWidth : 250 , maxWidth : 750 } ,
36+ slidePanel : { minWidth : 250 } ,
4837 routes : {
4938 getSourceRouteUrl : ( { sourceId } ) => `/?url=${ sourceId } ` ,
5039 getCellRouteUrl : ( { sourceId, col, row } ) => `/?url=${ sourceId } &col=${ col } &row=${ row } ` ,
0 commit comments