Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import './style';
- import { h } from 'preact';
- import { Router } from 'preact-router';
- import Header from './components/header';
- import Home from './routes/home';
- import Profile from './routes/profile';
- import Github from './routes/github'; // <--- Add this line
- export default () => (
- <div id="app">
- <Header />
- <Router>
- <Home path="/" />
- <Profile path="/profile/" user="me" />
- <Profile path="/profile/:user" />
- <Github path="/github" /> // <-- Attach the component with path
- </Router>
- </div>
- );
Add Comment
Please, Sign In to add comment