frontend/src/App.tsx

51 lines
1.2 KiB
TypeScript
Raw Normal View History

2020-06-03 15:43:11 +02:00
import React, { useState } from "react";
import TopBar from "./components/TopBar/";
import Transfer from "./components/Transfer/";
2020-05-24 18:32:11 +02:00
import "./App.scss";
2020-06-05 14:31:48 +02:00
import Schedule from "./components/Calendar/";
2020-06-07 15:57:51 +02:00
import { appointments } from "./components/Calendar/appointments";
import RightBar from "./components/RightBar";
function App() {
2020-06-03 15:43:11 +02:00
const [isOpen, setOpen] = useState(false);
const [text, setText] = useState("");
return (
<div className="App">
<TopBar
textChangeHandler={(e) => {
setText(e.target.value);
}}
2020-06-03 18:15:51 +02:00
handleTransfer={(e) => {
2020-06-03 15:43:11 +02:00
setOpen(!isOpen);
}}
2020-06-07 15:57:51 +02:00
handleLanguage={(e) => {
2020-06-04 16:07:20 +02:00
alert("Language");
2020-06-03 18:15:51 +02:00
}}
2020-06-07 15:57:51 +02:00
handleProfile={(e) => {
2020-06-04 16:07:20 +02:00
alert("Profile");
2020-06-03 18:15:51 +02:00
}}
2020-06-03 15:43:11 +02:00
isOpen={isOpen}
/>
<Transfer
isOpen={isOpen}
handleClose={(e) => {
setOpen(!isOpen);
}}
/>
2020-06-07 15:57:51 +02:00
<div className="wraper">
<div className="wraper__calendar">
2020-06-07 16:31:35 +02:00
<Schedule data={appointments} />
2020-06-07 15:57:51 +02:00
</div>
<div className="wraper__rightbar">
<RightBar />
</div>
</div>
<h1>{text}</h1>
2020-06-03 15:43:11 +02:00
</div>
);
}
export default App;