mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
05de4d83f3
* chore: header refactor. * fix: core imports * chore: refactor profile activity header and fix all other header imports. * fix: import fixes * chore: header refactor. * fix: app dir header reimplementation * fix: removing parllel headers * fix: adding route groups to handle pages * fix: disabling sentry for temp * chore: update default exports in layouts & headers for consistency. * fix: bugfixes * fix: build errors --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
25 lines
1.0 KiB
TypeScript
25 lines
1.0 KiB
TypeScript
import { useParams, usePathname, useRouter } from "next/navigation";
|
|
import { WORKSPACE_SETTINGS_LINKS } from "@/constants/workspace";
|
|
|
|
export const MobileWorkspaceSettingsTabs = () => {
|
|
const router = useRouter();
|
|
const { workspaceSlug } = useParams();
|
|
const pathname = usePathname();
|
|
return (
|
|
<div className="flex-shrink-0 md:hidden sticky inset-0 flex overflow-x-auto bg-custom-background-100 z-10">
|
|
{WORKSPACE_SETTINGS_LINKS.map((item, index) => (
|
|
<div
|
|
className={`${item.highlight(pathname, `/${workspaceSlug}`)
|
|
? "text-custom-primary-100 text-sm py-2 px-3 whitespace-nowrap flex flex-grow cursor-pointer justify-around border-b border-custom-primary-200"
|
|
: "text-custom-text-200 flex flex-grow cursor-pointer justify-around border-b border-custom-border-200 text-sm py-2 px-3 whitespace-nowrap"
|
|
}`}
|
|
key={index}
|
|
onClick={() => router.push(`/${workspaceSlug}${item.href}`)}
|
|
>
|
|
{item.label}
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
};
|