diff options
| author | Rafi Zadanly <rafizadanly@gmail.com> | 2022-12-22 15:29:18 +0700 |
|---|---|---|
| committer | Rafi Zadanly <rafizadanly@gmail.com> | 2022-12-22 15:29:18 +0700 |
| commit | 31d6352ab8855754ef18c01763d3c1b5a68de857 (patch) | |
| tree | e9b7e67a994574b5b1ccc7c8ef805a899f561d3d /src/components/AppBar.js | |
| parent | 7ca4c68e3c509004a84d05ebd6d66019c7e92b72 (diff) | |
Appbar component and auth hook (useAuth)
Diffstat (limited to 'src/components/AppBar.js')
| -rw-r--r-- | src/components/AppBar.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/components/AppBar.js b/src/components/AppBar.js new file mode 100644 index 00000000..f22d630f --- /dev/null +++ b/src/components/AppBar.js @@ -0,0 +1,36 @@ +import { HeartIcon, HomeIcon } from "@heroicons/react/24/outline"; +import { ChevronLeftIcon } from "@heroicons/react/24/solid"; +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 p-4 border-b border-gray_r-6"> + {/* --- Start Title */} + <button type="button" onClick={() => router.back()} className="flex gap-x-2 text-gray_r-12"> + <ChevronLeftIcon className="w-6 stroke-2"/> + <h1>{ title }</h1> + </button> + {/* --- End Title */} + + {/* --- Start Icons */} + <div className="flex gap-x-3"> + <HeartIcon className="w-6 stroke-2"/> + <Link href="/"> + <HomeIcon className="w-6 stroke-2 text-gray_r-12"/> + </Link> + </div> + {/* --- End Icons */} + </div> + </> + ); +}; + +export default AppBar;
\ No newline at end of file |
