AppFlowy/frontend/appflowy_tauri/src/appflowy_app/App.tsx
2023-01-24 14:01:30 +08:00

32 lines
613 B
TypeScript

import "./App.css";
import {
UserEventSignIn,
SignInPayloadPB,
} from "../services/backend/events/flowy-user";
import { nanoid } from "nanoid";
function App() {
async function greet() {
let make_payload = () =>
SignInPayloadPB.fromObject({
email: nanoid(4) + "@gmail.com",
password: "A!@123abc",
name: "abc",
});
await UserEventSignIn(make_payload());
}
return (
<div className="container">
<h1>Welcome to AppFlowy!</h1>
<button type="button" onClick={() => greet()}>
Sign in
</button>
</div>
);
}
export default App;