plane/web/components/profile/preferences/preferences-mobile-header.tsx
Ramesh Kumar Chandra 709d3a115b
[WEB-711] style: profile and its settings pages responsiveness (#4022)
* [WEB-711] style: profile and its settings pages responsiveness

* chore: linting issues fix

* fix: mobile-view padding

---------

Co-authored-by: LAKHAN BAHETI <lakhanbaheti9@gmail.com>
2024-04-29 12:59:49 +05:30

39 lines
1014 B
TypeScript

import Link from "next/link";
import router from "next/router";
// helpers
import { cn } from "@/helpers/common.helper";
export const PreferencesMobileHeader = () => {
const profilePreferenceLinks: Array<{
label: string;
href: string;
}> = [
{
label: "Theme",
href: `/profile/preferences/theme`,
},
{
label: "Email",
href: `/profile/preferences/email`,
},
];
return (
<div className={cn("sticky top-0 flex md:hidden w-full border-b border-custom-border-200")}>
{profilePreferenceLinks.map((link, index) => (
<Link
key={index}
href={link.href}
onClick={() => console.log(router.asPath)}
className={cn(
"flex justify-around py-2 w-full",
router.asPath.includes(link.label.toLowerCase()) ? "border-b-2 border-custom-primary-100" : ""
)}
>
<div className="text-sm text-custom-text-200">{link.label}</div>
</Link>
))}
</div>
);
};