import { DraftPermission } from 'src/types/posts';

export const checkIsFinalAuthor = (
  loggedUserId,
  draftPermissions?: DraftPermission[],
) =>
  draftPermissions?.some(
    draftPermission => draftPermission?.userToId === loggedUserId,
  ) ?? false;
