Refactor code style and improve indentation consistency in src/index.js
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, {useState, useEffect} from 'react';
|
||||||
import { createRoot } from 'react-dom/client';
|
import {createRoot} from 'react-dom/client';
|
||||||
import './styles/globals.css';
|
import './styles/globals.css';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import Login from './components/Auth/Login';
|
import Login from './components/Auth/Login';
|
||||||
@@ -21,13 +21,13 @@ function Root() {
|
|||||||
setAuthed(true);
|
setAuthed(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
return authed ? <App /> : <Login onLogin={handleLogin} />;
|
return authed ? <App/> : <Login onLogin={handleLogin}/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const container = document.getElementById('root');
|
const container = document.getElementById('root');
|
||||||
const root = createRoot(container);
|
const root = createRoot(container);
|
||||||
root.render(
|
root.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<Root />
|
<Root/>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user