Skip to content

Commit

Permalink
Update(frontend): updated the PinInput page and added more funtionali…
Browse files Browse the repository at this point in the history
…ties.
  • Loading branch information
Motouom committed Apr 12, 2024
1 parent e3490ac commit 3658746
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 41 deletions.
2 changes: 1 addition & 1 deletion power-pay-frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@

.read-the-docs {
color: #888;
}
}
26 changes: 24 additions & 2 deletions power-pay-frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
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> */}
</>
)
}

export default App
export default App
17 changes: 6 additions & 11 deletions power-pay-frontend/src/components/pinInput.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
import { Link } from 'react-router-dom';


const PinInput: React.FC = () => {




return (
<div className="flex justify-center items-center mb-34 border border-white bg-800 text-black text-sm">
<div className="flex justify-center items-center mb-34 bg-800 text-black text-sm">
<div className="">
<div className="flex rounded-lg w-80 m-auto px-4 py-2 text-lg absolute inset-x-0 top-7 bg-gray-100">
<div className="flex rounded-lg w-80 m-auto px-4 py-2 text-lg absolute inset-x-0 top-4 bg-gray-100">
<div>
<h1 className="text-lg text-center text-red-400 pb-5">Notice!!!</h1>
<p className="text-sm text-center text-black-400 pb-4">By entering you PIN below, you confirm that the sum of of FCFA100.50 be sent to Mr Stephane</p>
</div>
</div>
<div className="pt-12">
<form className="max-w-sm mx-auto">
<input type="password" id="number-input" aria-describedby="helper-text-explanation" className="text-lg rounded-full w-80 p-2.5 bg-red-50 dark:placeholder-gray-400 dark:text-black" placeholder="Enter PIN" required />
<div className="input-area">
<form className="max-w-sm mx-auto flex rounded-lg w-80 m-auto text-lg absolute inset-x-0">
<input type="password"maxLength={4} id="number-input" className="text-lg text-center rounded-full w-80 p-2.5 bg-red-50 dark:placeholder-gray-400 dark:text-black" placeholder="Enter PIN" required />
</form>
</div>
<div className="pt-12">
<button className="rounded-full w-80 m-auto px-4 py-2 my-16 text-white bg-red-600 text-lg absolute inset-x-0 bottom-12">
<button className="rounded-full w-80 m-auto px-4 py-2 my-16 text-white bg-red-600 hover:border-red-950 text-lg absolute inset-x-0 bottom-12">
Cancel
</button>
<Link to="/OKPage">
<button className="rounded-full w-80 m-auto px-4 py-2 text-white bg-blue-950 text-lg absolute inset-x-0 bottom-12">
Confirm
</button>
</Link>
</div>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions power-pay-frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #ffffff;

font-synthesis: none;
text-rendering: optimizeLegibility;
Expand Down Expand Up @@ -65,4 +64,4 @@ button:focus-visible {
button {
background-color: #f9f9f9;
}
}
}
30 changes: 5 additions & 25 deletions power-pay-frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,15 @@

import React from 'react'
import { createBrowserRouter, RouterProvider } from 'react-router-dom'
import ReactDOM from 'react-dom/client'
import { Outlet } from 'react-router-dom'
import App from './App.tsx'
import OKPage from './components/okpage.tsx'
import './index.css'
import PinInput from './components/pinInput.tsx'



const router = createBrowserRouter([
{
path: "/",
element: <PinInput/>,

},

{
path: "/OkPage",
element: <OKPage />,
},



// import PinInput from './components/pinInput.tsx'
import OKPage from './components/okpage.tsx'

])
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<RouterProvider router={router} />
<Outlet />
<App />
<App />
{/* <PinInput /> */}
<OKPage />
</React.StrictMode>,
)

0 comments on commit 3658746

Please sign in to comment.