add crud api

This commit is contained in:
2021-06-13 01:56:32 +03:00
parent 3e68914c92
commit 32da4e52ae
30 changed files with 582 additions and 63 deletions

View File

@ -1,19 +1,11 @@
import React, {memo} from 'react';
import {changeNameAction, nameAtom} from '_infrastructure/atom/exampleAtom';
import {useAction, useAtom} from '@reatom/react';
const MainPage: React.FC = () => {
const name = useAtom(nameAtom);
const handleChangeName = useAction(e => changeNameAction(e.currentTarget.value));
return (
<div>
<div>main page</div>
<div>Админка Crypto-bot</div>
<form>
<label htmlFor="name">Enter your name: </label>
<input id="name" value={name} onChange={handleChangeName} />
</form>
<div>Выбирите нужный раздел</div>
</div>
);
};