mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Add copy and submit project options to new editor file menu GitOrigin-RevId: 7f402d96f278f2b084375441089b286adaa731b8
16 lines
320 B
TypeScript
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
|
|
}
|