You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
932 B
32 lines
932 B
2 years ago
|
import { Component } from 'solid-js';
|
||
|
import RestClient from '../api/RestClient';
|
||
|
|
||
|
const Login: Component = () => {
|
||
|
const TEST_USER = {
|
||
|
id: '310c0d24-cc2e-4798-a259-0d49bf2e3a5a',
|
||
|
hash: 'MEIN_HASH',
|
||
|
login: 'phga',
|
||
|
salt: 'MEIN_SALZ',
|
||
|
};
|
||
|
|
||
|
const btnPrimary =
|
||
|
'inline-block px-6 py-2.5 bg-blue-600 text-white font-medium text-xs leading-tight uppercase rounded-full shadow-md hover:bg-blue-700 hover:shadow-lg focus:bg-blue-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out';
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
<h1 class='text-4xl'>Login</h1>
|
||
|
<button class={btnPrimary} onClick={() => RestClient.GET('/')}>
|
||
|
GET_HOME
|
||
|
</button>
|
||
|
<button
|
||
|
class={btnPrimary}
|
||
|
onClick={() => RestClient.POST('/login', JSON.stringify(TEST_USER))}
|
||
|
>
|
||
|
POST_LOGIN
|
||
|
</button>
|
||
|
</>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default Login;
|