import React from "react"; import "./index.scss"; import Transfer from "./transfer.png"; import Search from "./search.svg"; import UK from "./UK.png"; import PL from "./PL.png"; import User from "./user.png"; import CloseIcon from "./close.svg"; import { Profile } from "./Profile"; import {Results} from "./Results"; interface TopBarProps { handleTransfer: (e: React.MouseEvent) => void; onLangChange: (lang: boolean) => void; handleLogout: () => void; } interface TopBarState { isPolish: boolean; anchorEl: HTMLElement | null; } export default class TopBar extends React.Component { constructor(props: TopBarProps) { super(props); this.handleProfile = this.handleProfile.bind(this); this.handleClose = this.handleClose.bind(this); this.onLangChange = this.onLangChange.bind(this); this.handleTransfer = this.handleTransfer.bind(this); this.state = { isPolish: true, anchorEl: null, }; } handleTransfer(e: React.MouseEvent) { this.props.handleTransfer(e); } onLangChange(e: React.MouseEvent) { this.setState({ isPolish: !this.state.isPolish, }); this.props.onLangChange(this.state.isPolish); } handleProfile(event: React.MouseEvent) { this.setState({ anchorEl: event.currentTarget, }); } handleClose() { this.setState({ anchorEl: null, }); } render() { return (
logo
plan na plan
search
close
transfer change_language profile
); } }