feat: profile page
This commit is contained in:
@@ -2,6 +2,7 @@ import { FunctionComponent } from "preact";
|
|||||||
import { ErrorBoundary, LocationProvider, Route, Router, useLocation } from "preact-iso";
|
import { ErrorBoundary, LocationProvider, Route, Router, useLocation } from "preact-iso";
|
||||||
import "preact/debug";
|
import "preact/debug";
|
||||||
import LoginPage from "./pages/login";
|
import LoginPage from "./pages/login";
|
||||||
|
import ProfilePage from "./pages/profile";
|
||||||
|
|
||||||
const HomePage: FunctionComponent = () => {
|
const HomePage: FunctionComponent = () => {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
@@ -11,15 +12,14 @@ const HomePage: FunctionComponent = () => {
|
|||||||
|
|
||||||
export function App() {
|
export function App() {
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<LocationProvider>
|
<LocationProvider>
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
<Router>
|
<Router>
|
||||||
<Route path="/" component={HomePage} />
|
<Route path="/" component={HomePage} />
|
||||||
<Route path="/login" component={LoginPage} />
|
<Route path="/login" component={LoginPage} />
|
||||||
|
<Route path="/profile" component={ProfilePage} />
|
||||||
</Router>
|
</Router>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
</LocationProvider>
|
</LocationProvider>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/components/layout.tsx
Normal file
13
src/components/layout.tsx
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import { FunctionComponent } from "preact";
|
||||||
|
import Menu from "./menu";
|
||||||
|
|
||||||
|
const Layout: FunctionComponent = (props) => {
|
||||||
|
return (
|
||||||
|
<div class="flex min-w-screen flex-row justify-between">
|
||||||
|
{props.children}
|
||||||
|
<Menu />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Layout;
|
||||||
1
src/pages/profile.module.scss
Normal file
1
src/pages/profile.module.scss
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@reference "../index.scss";
|
||||||
12
src/pages/profile.tsx
Normal file
12
src/pages/profile.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import Layout from "@/components/layout";
|
||||||
|
import { FunctionComponent } from "preact";
|
||||||
|
|
||||||
|
const ProfilePage: FunctionComponent = () => {
|
||||||
|
return (
|
||||||
|
<Layout>
|
||||||
|
<p>Profile</p>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ProfilePage;
|
||||||
Reference in New Issue
Block a user