const extractId = (action: Action, data?: unknown) =>
  action.payload.id || (isTypedData(data) && data.id) || undefined