Review changes done added useref

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2023-08-21 15:32:43 +05:30
parent d34f809ff6
commit bedea3cae1
@@ -76,15 +76,15 @@ export const PlaylistEditDialog = ({
const classes = useStyles();
const identityApi = useApi(identityApiRef);
const playlistApi = useApi(playlistApiRef);
const playlistPromise = useRef(
playlistApi.getAllPlaylists({ editable: true }),
);
const [editingOtherFields, setEditingOtherFields] = useState(false);
const { loading: loadingOwnership, value: ownershipRefs } =
useAsync(async () => {
const { ownershipEntityRefs } = await identityApi.getBackstageIdentity();
return ownershipEntityRefs;
}, []);
const playlistPromise = useRef(
playlistApi.getAllPlaylists({ editable: true }),
);
const nameIsUnique = async (
name: string,