Files
overleaf-cep/services/web/frontend/js/shared/hooks/use-open-project.ts
David 975d1ee250 Merge pull request #27316 from overleaf/dp-file-menu-options
Add copy and submit project options to new editor file menu

GitOrigin-RevId: 7f402d96f278f2b084375441089b286adaa731b8
2025-08-21 08:05:37 +00:00

16 lines
320 B
TypeScript

import { useCallback } from 'react'
import { useLocation } from './use-location'
export default function useOpenProject() {
const location = useLocation()
const openProject = useCallback(
(projectId: string) => {
location.assign(`/project/${projectId}`)
},
[location]
)
return openProject
}