import type { Component } from 'solid-js';
import type { RouteSectionProps } from '@solidjs/router';
import { HashRouter } from '@solidjs/router';
import { SSModalsProvider } from 'src';
import { routes } from './routes';

const AppRoot: Component<RouteSectionProps> = (props) => (
  <SSModalsProvider>{props.children}</SSModalsProvider>
);

const App: Component = () => (
  <HashRouter root={AppRoot}>
    {routes}
  </HashRouter>
);

export default App;
