import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { getRouterBasename } from '@dukang/weixin-sdk';
import { StoreSessionProvider } from './contexts/StoreSessionContext';
import App from './App';
import './styles.css';
import './styles/legal.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <BrowserRouter basename={getRouterBasename()}>
      <StoreSessionProvider>
        <App />
      </StoreSessionProvider>
    </BrowserRouter>
  </React.StrictMode>,
);
