aboutsummaryrefslogtreecommitdiff
path: root/client/src/components/Header/Header.jsx
blob: 9682104798240d8342067b7256f4a4ccbc4c1fb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from "react";
import { Link } from "react-router-dom";
import { SUPPORTED_LANGUAGES } from "../../utils/constants";
import styles from "./Header.module.css";
import CustomSelect from "../CustomSelect/CustomSelect";

const Header = ({ isSelectVisible, onLanguageChange }) => {
  return (
    <div className={styles.header}>
      <Link to="/">
        <h1>
          <span className={styles.header__mini}>mini</span>bin
        </h1>
      </Link>
      {isSelectVisible && (
        <CustomSelect
          options={SUPPORTED_LANGUAGES}
          onSelect={onLanguageChange}
        />
      )}
    </div>
  );
};

export default Header;