Skip to content

Commit

Permalink
Remove changes to frontend related files
Browse files Browse the repository at this point in the history
  • Loading branch information
NoB0 committed Nov 21, 2023
1 parent d3d9004 commit 59a9882
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 109 deletions.
21 changes: 5 additions & 16 deletions pkg_client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import React, { useContext } from "react";
import React from "react";
import "./App.css";
import APIHandler from "./APIHandler";
import LoginForm from "./components/LoginForm/LoginForm";
import Container from 'react-bootstrap/Container'
import { UserContext } from "./contexts/UserContext";

function App() {
const { user } = useContext(UserContext);

const content = !user ? <LoginForm /> : <APIHandler />;

return (
<Container className="p-3">
<Container className="p-3 mb-4 bg-light rounded-3">
<div className="App">
{content}
</div>
</Container>
</Container>
<div className="App">
<APIHandler />
</div>
);
}

export default App;
export default App;
65 changes: 0 additions & 65 deletions pkg_client/src/components/LoginForm/LoginForm.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions pkg_client/src/contexts/UserContext.tsx

This file was deleted.

8 changes: 2 additions & 6 deletions pkg_client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import 'bootstrap/dist/css/bootstrap.min.css';
import { UserProvider } from './contexts/UserContext';

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<UserProvider>
<App />
</UserProvider>
<App />
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
reportWebVitals();

0 comments on commit 59a9882

Please sign in to comment.