Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 9e01911

Browse files
committed
Setup login page template
1 parent 2c8ae4d commit 9e01911

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

client/src/index.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1+
import Router from 'preact-router'
2+
import Login from './login'
13
import 'promise-polyfill/src/polyfill'
24
import 'unfetch/polyfill/index'
35
import 'regenerator-runtime/runtime'
46
import { Component } from 'preact'
5-
import withStyles from './jss'
67

7-
export default withStyles({
8-
root: {
9-
color: 'red'
10-
}
11-
}, class App extends Component {
12-
render ({ classes }) {
8+
export default class App extends Component {
9+
render () {
1310
return (
14-
<h1 class={classes.root}>test</h1>
11+
<Router>
12+
<Login path='/login' />
13+
</Router>
1514
)
1615
}
17-
})
16+
}

client/src/login.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Component } from 'preact'
2+
import withStyles from './jss'
3+
4+
export default withStyles({
5+
root: {
6+
color: 'red'
7+
}
8+
}, class App extends Component {
9+
render ({ classes }) {
10+
return (
11+
<h1 class={classes.root}>Login</h1>
12+
)
13+
}
14+
})

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"nyc": "^15.0.0",
4040
"preact": "^10.3.1",
4141
"preact-cli": "^2.2.1",
42+
"preact-router": "^3.2.1",
4243
"promise-polyfill": "^8.1.3",
4344
"regenerator-runtime": "^0.13.3",
4445
"standard": "^14.3.1",

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6605,6 +6605,11 @@ preact-router@^2.5.2:
66056605
version "2.6.1"
66066606
resolved "https://registry.yarnpkg.com/preact-router/-/preact-router-2.6.1.tgz#eec60a9f2c07a1ae4fbc6604d8a0415742fbbd89"
66076607

6608+
preact-router@^3.2.1:
6609+
version "3.2.1"
6610+
resolved "https://registry.yarnpkg.com/preact-router/-/preact-router-3.2.1.tgz#c7d12d8fc7a60bfbe5cadf23a234551bec783468"
6611+
integrity sha512-KEN2VN1DxUlTwzW5IFkF13YIA2OdQ2OvgJTkQREF+AA2NrHRLaGbB68EjS4IeZOa1shvQ1FvEm3bSLta4sXBhg==
6612+
66086613
preact-transition-group@^1.1.1:
66096614
version "1.1.1"
66106615
resolved "https://registry.yarnpkg.com/preact-transition-group/-/preact-transition-group-1.1.1.tgz#f0a49327ea515ece34ea2be864c4a7d29e5d6e10"

0 commit comments

Comments
 (0)