parent
ee2286043e
commit
ce4fdac3bb
@ -1,31 +1,7 @@
|
||||
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>
|
||||
</>
|
||||
);
|
||||
return <h1 class='text-4xl'>Login</h1>;
|
||||
};
|
||||
|
||||
export default Login;
|
||||
|
@ -0,0 +1,37 @@
|
||||
import { Component } from 'solid-js';
|
||||
import RestClient from '../api/RestClient';
|
||||
|
||||
const Test: 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'>TEST</h1>
|
||||
<button class={btnPrimary} onClick={() => RestClient.GET('/')}>
|
||||
GET_HOME
|
||||
</button>
|
||||
<button
|
||||
class={btnPrimary}
|
||||
onClick={() => RestClient.POST('/login', JSON.stringify(TEST_USER))}
|
||||
>
|
||||
POST_LOGIN
|
||||
</button>
|
||||
<button class={btnPrimary} onClick={() => RestClient.GET('/user')}>
|
||||
GET_USER
|
||||
</button>
|
||||
<button class={btnPrimary} onClick={() => RestClient.GET('/todo')}>
|
||||
GET_TODO
|
||||
</button>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Test;
|
Loading…
Reference in new issue