mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
709d3a115b
* [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>
39 lines
1014 B
TypeScript
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>
|
|
);
|
|
};
|