init repo

This commit is contained in:
grimhilt
2023-07-30 19:11:43 +02:00
commit f820f0142b
9 changed files with 42652 additions and 0 deletions

23
src/app.js Normal file
View File

@@ -0,0 +1,23 @@
import Layout from './components/layout';
import { MantineProvider, ColorSchemeProvider } from '@mantine/core';
import { AuthProvider } from './tools/auth-provider';
import { Notifications } from '@mantine/notifications';
import { useColorSchemeToggle } from './tools/color-scheme-toggle'
const App = () => {
const [ colorScheme, toggleColorScheme ] = useColorSchemeToggle();
return (
<>
<AuthProvider>
<ColorSchemeProvider colorScheme={colorScheme} toggleColorScheme={toggleColorScheme}>
<MantineProvider withGlobalStyles withNormalizeCSS theme={{ colorScheme }}>
<Notifications />
<Layout />
</MantineProvider>
</ColorSchemeProvider>
</AuthProvider>
</>
);
};
export default App;

10
src/index.js Normal file
View File

@@ -0,0 +1,10 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './app';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);

11
src/setupProxy.js Normal file
View File

@@ -0,0 +1,11 @@
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://192.168.2.183:5500',
changeOrigin: true,
})
);
};