mirror of
https://github.com/gosticks/plane.git
synced 2025-10-16 12:45:33 +00:00
* chore: sidebar peek state added to theme store * chore: extended sidebar wrapper added * chore: resizeable sidebar component added * chore: appsidebar root component * chore: updated sidebar and applied necessary changes across codebase * chore: code refactor * chore: code refactor * chore: code refactor * chore: breadcrumb changes * chore: sidebar improvements and fixes * chore: enhancements and fixes * fix: peek sidebar leave * chore: code refactor * chore: code refactor * chore: code refactor * chore: icons added * chore: add dock variable and toggle function to theme store * chore: code refactor * chore: code refactor * chore: code refactor * chore: theme and workspace store updated * chore: workspace content wrapper and apprail context * chore: workspace and project wrapper updated * chore: app rail component * chore: content wrapper * chore: sidebar component updated * chore: layout changes and code refactoring * chore: code refactor * chore: code refactor * chore: code refactor * chore: code refactor * chore: code refactor * chore: code refactor * chore: appsidebar toggle button * chore: code refactor * chore: workspace menu improvements * chore: sidebar spacing and padding improvements * chore: settings layout improvement * chore: enhancements * chore: extended sidebar code refactor * chore: code refactor * fix: merge conflict * fix: merge conflict * chore: code refactor * chore: code refactor * chore: code refactor * chore: code refactor
25 lines
735 B
TypeScript
25 lines
735 B
TypeScript
"use client";
|
|
|
|
import { useParams, usePathname } from "next/navigation";
|
|
|
|
/**
|
|
* Custom hook to detect different workspace paths
|
|
* @returns Object containing boolean flags for different workspace paths
|
|
*/
|
|
export const useWorkspacePaths = () => {
|
|
const { workspaceSlug } = useParams();
|
|
const pathname = usePathname();
|
|
|
|
const isSettingsPath = pathname.includes(`/${workspaceSlug}/settings`);
|
|
const isWikiPath = pathname.includes(`/${workspaceSlug}/pages`);
|
|
const isAiPath = pathname.includes(`/${workspaceSlug}/pi-chat`);
|
|
const isProjectsPath = pathname.includes(`/${workspaceSlug}/`) && !isWikiPath && !isAiPath && !isSettingsPath;
|
|
|
|
return {
|
|
isSettingsPath,
|
|
isWikiPath,
|
|
isAiPath,
|
|
isProjectsPath,
|
|
};
|
|
};
|