refactor: login component
This commit is contained in:
parent
5121a592a4
commit
8c2f445b56
|
@ -1,15 +1,13 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {hot} from 'react-hot-loader';
|
import {hot} from 'react-hot-loader';
|
||||||
|
|
||||||
|
import Login from '@latus/user/client/components/login';
|
||||||
|
|
||||||
const App = () => (
|
const App = () => (
|
||||||
<div className="app">
|
<div className="app">
|
||||||
<h1>Latus react app</h1>
|
<h1>Latus react app</h1>
|
||||||
<p>Yay, you maaaaade it! :)</p>
|
<p>Yay, you maaaaade it! :)</p>
|
||||||
<form action="/auth/local" method="post">
|
<Login />
|
||||||
<input name="email" />
|
|
||||||
<input name="password" />
|
|
||||||
<input type="submit" />
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
const splitConfig = require('../../config/split-config');
|
const splitConfig = require('../../config/split-config');
|
||||||
const pkg = require('./package.json');
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
const clientMains = [];
|
const clientMains = [
|
||||||
|
'client/components/login',
|
||||||
|
];
|
||||||
|
|
||||||
module.exports = splitConfig(pkg, clientMains);
|
module.exports = splitConfig(pkg, clientMains);
|
||||||
|
|
10
packages/user/src/client/components/login.jsx
Normal file
10
packages/user/src/client/components/login.jsx
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
import {React} from '@latus/react/client';
|
||||||
|
|
||||||
|
export default () => (
|
||||||
|
<form action="/auth/local" method="post">
|
||||||
|
<input name="email" />
|
||||||
|
<input name="password" />
|
||||||
|
<input type="submit" />
|
||||||
|
</form>
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user