+ const updatedLink = { ...link };
+ if (head.name) updatedLink.name = head.name;
+ return updatedLink;
+};
+
+const updateRemoteLinkName = (link: LinkResource) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+ try {
+ const kind = extractUuidKind(link.uuid);
+ const service = getResourceService(kind)(services);
+ if (service) {
+ service.update(link.uuid, { name: link.name });
+ }
+ } catch (error) {
+ console.error('Could not update link name', link, error);
+ }
+};