mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-29 05:00:06 +02:00

* Move `hasLintingError` from scope to react state * Move `permissionsLevel` to IdeReactContext states * Get `permissionsLevel` from `useIdeReactContext()` * Set `permissionsLevel` in mocked `IdeReactProvider` * Replace `permissions` scope by React state * Fixup `permission` changes * Remove redundant type GitOrigin-RevId: 6203c61f9ac429789624196bf67e508310f4577f
8 lines
251 B
TypeScript
8 lines
251 B
TypeScript
import { useIdeReactContext } from '@/features/ide-react/context/ide-react-context'
|
|
|
|
function useViewerPermissions() {
|
|
const { permissionsLevel } = useIdeReactContext()
|
|
return permissionsLevel === 'readOnly'
|
|
}
|
|
|
|
export default useViewerPermissions
|