frontend/src/App.tsx
wrzesinski-hubert 7e47aea64e brzydkie slowa
2020-06-04 16:07:20 +02:00

39 lines
810 B
TypeScript

import React, { useState } from "react";
import TopBar from "./components/TopBar/";
import Transfer from "./components/Transfer/";
import "./App.scss";
function App() {
const [isOpen, setOpen] = useState(false);
const [text, setText] = useState("");
return (
<div className="App">
<TopBar
textChangeHandler={(e) => {
setText(e.target.value);
}}
handleTransfer={(e) => {
setOpen(!isOpen);
}}
handleLanguage={(e)=>{
alert("Language");
}}
handleProfile={(e)=>{
alert("Profile");
}}
isOpen={isOpen}
/>
<Transfer
isOpen={isOpen}
handleClose={(e) => {
setOpen(!isOpen);
}}
/>
<h1>{text}</h1>
</div>
);
}
export default App;