import React from 'react' import { Link, Typography } from '@mui/material' import { observer } from 'mobx-react' import { smallMSA, smallMSAOnly, smallTree } from './data/seq2.ts' import { load } from './util.ts' import type { MsaViewModel } from '../../model.ts' function ListItem({ onClick, model, children, }: { onClick: () => void model: MsaViewModel children: React.ReactNode }) { return (
  • { model.setError(undefined) event.preventDefault() onClick() }} href="#" > {children}
  • ) } const BASE = 'https://jbrowse.org/genomes/multiple_sequence_alignments' const ImportFormExamples = observer(function ({ model, }: { model: MsaViewModel }) { function loadUris({ msa, tree, gff, }: { msa?: string tree?: string gff?: string }) { // eslint-disable-next-line @typescript-eslint/no-floating-promises ;(async () => { try { await load( model, msa ? { uri: msa, locationType: 'UriLocation' } : undefined, tree ? { uri: tree, locationType: 'UriLocation' } : undefined, gff ? { uri: gff, locationType: 'UriLocation' } : undefined, ) } catch (e) { console.error(e) model.setError(e) } })() } return ( ) }) export default ImportFormExamples