Remove some dead code (#6611)
We could remove a lot more than this, this is just a start. There are various tools to help with this, knip is a good one
This commit is contained in:
@ -1,25 +0,0 @@
|
||||
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';
|
||||
|
||||
export const useGetSyncStatusOptions = () => {
|
||||
const { objectMetadataItem } = useObjectMetadataItem({
|
||||
objectNameSingular: CoreObjectNameSingular.MessageChannel,
|
||||
});
|
||||
|
||||
if (isUndefinedOrNull(objectMetadataItem)) {
|
||||
throw new Error('ObjectMetadataItem not found for MessageChannel');
|
||||
}
|
||||
|
||||
const syncStatusMetadata = objectMetadataItem.fields.find(
|
||||
(field) => field.name === 'syncStatus',
|
||||
);
|
||||
|
||||
const syncStatusOptions = syncStatusMetadata?.options;
|
||||
|
||||
if (isUndefinedOrNull(syncStatusMetadata)) {
|
||||
throw new Error('syncStatusMetaData not found for MessageChannel');
|
||||
}
|
||||
|
||||
return syncStatusOptions;
|
||||
};
|
||||
Reference in New Issue
Block a user