summaryrefslogtreecommitdiff
path: root/src/components/AppBar.js
blob: 55af9f1a486bbc0a5ebafb150b58b305c5100bf4 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { ArrowLeftIcon, HeartIcon, HomeIcon } from "@heroicons/react/24/outline";
import Head from "next/head";
import { useRouter } from "next/router";
import Link from "./Link";

const AppBar = ({ title }) => {
  const router = useRouter();

  return (
    <>
      <Head>
        <title>{ title } - Indoteknik</title>
      </Head>
      <div className="flex justify-between pr-4 border-b border-gray_r-6 bg-gray_r-1">
        {/* --- Start Title */}
        <div className="flex items-center">
          <button type="button" onClick={() => router.back()} className="text-gray_r-12 px-4 py-5">
            <ArrowLeftIcon className="w-6 stroke-2"/>
          </button>
          <h1 className="text-h-md">{ title }</h1> 
        </div>
        {/* --- End Title */}

        {/* --- Start Icons */}
        <div className="flex gap-x-4 items-center">
          <Link href="/">
            <HeartIcon className="w-6 stroke-2 text-gray_r-12"/>
          </Link>
          <Link href="/">
            <HomeIcon className="w-6 stroke-2 text-gray_r-12"/>
          </Link>
        </div>
        {/* --- End Icons */}
      </div>
    </>
  );
};

export default AppBar;