Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

416 B
Raw Blame
import { useRouter } from "@tanstack/react-router";
import {
  PROJECT_ROUTE_PATHS,
  type ProjectView,
  routeForView,
} from "./project-views";

export function useProjectViewHref(
  view: ProjectView,
  workspaceId: string,
  projectId: string,
) {
  const router = useRouter();
  return router.buildLocation({
    to: PROJECT_ROUTE_PATHS[routeForView(view)],
    params: { workspaceId, projectId },
  }).href;
}