feature/share-libs
tsx 24 lines 727 Bytes
Raw
1 'use client';
2
3 import React from 'react';
4 import { usePathname } from 'next/navigation';
5 import { HomeIcon } from '@heroicons/react/solid';
6 import { useLogger } from '../../lib/logger';
7
8 export function AddressBar() {
9 const log = useLogger('AddressBar');
10 const pathname = usePathname();
11 log.debug("pathname", pathname);
12 return (
13 <div className="flex items-center gap-x-2 p-3.5 lg:px-5 lg:py-3">
14 <div className="text-gray-600">
15 <HomeIcon width={16} />
16 </div>
17 <div className="flex gap-x-1 text-sm font-medium">
18 <span className="animate-[highlight_1s_ease-in-out_1] text-gray-100">
19 {pathname.replaceAll("/", "").toUpperCase()}
20 </span>
21 </div>
22 </div>
23 );
24 }