rage-framework-example/apps/browser/src/App.tsx
2025-03-28 17:03:23 +02:00

33 lines
971 B
TypeScript

import React from 'react'
import LoginPage from './pages/Authorization/LoginPage'
import RegisterPage from './pages/Authorization/RegisterPage'
import './index.css'
function App() {
const [showLogin, setShowLogin] = React.useState(true)
return (
<div>
<div className="p-4 text-center">
<button
onClick={() => setShowLogin(true)}
className={`mr-2 px-4 py-2 rounded ${showLogin ? 'bg-sky-600 text-white' : 'bg-gray-300'}`}
>
Show Login
</button>
<button
onClick={() => setShowLogin(false)}
className={`px-4 py-2 rounded ${!showLogin ? 'bg-sky-600 text-white' : 'bg-gray-300'}`}
>
Show Register
</button>
</div>
{showLogin ? <LoginPage /> : <RegisterPage />}
</div>
)
}
export default App