Skip to content

Commit

Permalink
Update(front-end): Used routing for better management of pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Motouom committed Apr 15, 2024
1 parent 0836b80 commit d84faeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
26 changes: 2 additions & 24 deletions power-pay-frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
// import { Link } from 'react-router-dom'; uncomment this line of you want to use react-router in the app
import './App.css'

function App() {
// const [count, setCount] = useState(0)

return (
<>
{/* <div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p> */}
{/* Add the link to the path to the page you want */}
</>
)
}
Expand Down
16 changes: 6 additions & 10 deletions power-pay-frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@

import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'
// import PinInput from './components/pinInput.tsx'
import OKPage from './components/okpage.tsx'
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import './index.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
{/* <PinInput /> */}
<OKPage />
<App />
{/* adding the path to the okpage */}
</React.StrictMode>,
)

0 comments on commit d84faeb

Please sign in to comment.