playwright/tests/components/ct-react17/src/App.tsx

22 lines
645 B
TypeScript
Raw Normal View History

2022-11-08 17:40:06 +01:00
import { Routes, Route, Link } from 'react-router-dom';
2022-08-29 18:17:01 +02:00
import logo from './assets/logo.svg';
2022-11-08 17:40:06 +01:00
import LoginPage from './pages/LoginPage';
import DashboardPage from './pages/DashboardPage';
2022-03-12 00:46:11 +01:00
export default function App({ title }: { title?: string }) {
2022-11-08 17:40:06 +01:00
return <>
<header>
<img src={logo} alt="logo" width={125} height={125} />
{title && <h1>{title}</h1>}
2022-11-08 17:40:06 +01:00
<Link to="/">Login</Link>
<Link to="/dashboard">Dashboard</Link>
</header>
<Routes>
<Route path="/">
<Route index element={<LoginPage />} />
<Route path="dashboard" element={<DashboardPage />} />
</Route>
</Routes>
</>
2022-03-12 00:46:11 +01:00
}