refactor: login component

This commit is contained in:
cha0s 2020-12-21 16:57:29 -06:00
parent 5121a592a4
commit 8c2f445b56
3 changed files with 16 additions and 6 deletions

View File

@ -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>
); );

View File

@ -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);

View 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>
);