Sets up the foundational structure for the CAR Auto Center application using Vite and React. Includes project dependencies, basic HTML structure, TypeScript configuration, and initial README content. This commit establishes the project's build tool, core libraries, and essential configuration files.
21 lines
533 B
TypeScript
21 lines
533 B
TypeScript
import React from 'react';
|
|
import ReactDOM from 'react-dom/client';
|
|
import { HashRouter } from 'react-router-dom';
|
|
import App from './App';
|
|
import { DataProvider } from './contexts/DataContext';
|
|
|
|
const rootElement = document.getElementById('root');
|
|
if (!rootElement) {
|
|
throw new Error("Could not find root element to mount to");
|
|
}
|
|
|
|
const root = ReactDOM.createRoot(rootElement);
|
|
root.render(
|
|
<React.StrictMode>
|
|
<HashRouter>
|
|
<DataProvider>
|
|
<App />
|
|
</DataProvider>
|
|
</HashRouter>
|
|
</React.StrictMode>
|
|
); |