* Handled new url v2 type * Fixed refetch queries * wip * Ok delete but views bug * Fix lint --------- Co-authored-by: Charles Bochet <charles@twenty.com>
19 lines
545 B
TypeScript
19 lines
545 B
TypeScript
import { useAvailableScopeIdOrThrow } from '@/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId';
|
|
|
|
import { MetadataObjectScopeInternalContext } from '../scopes/scope-internal-context/MetadataObjectScopeInternalContext';
|
|
|
|
type UseMetadataObjectProps = {
|
|
metadataObjectNamePlural?: string;
|
|
};
|
|
|
|
export const useMetadataObject = (props?: UseMetadataObjectProps) => {
|
|
const scopeId = useAvailableScopeIdOrThrow(
|
|
MetadataObjectScopeInternalContext,
|
|
props?.metadataObjectNamePlural,
|
|
);
|
|
|
|
return {
|
|
scopeId,
|
|
};
|
|
};
|