Page MenuHomePhabricator

[lib] Allow calling link-disabling endpoint
ClosedPublic

Authored by tomek on May 22 2023, 6:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 15, 3:39 PM
Unknown Object (File)
Fri, Apr 12, 6:32 PM
Unknown Object (File)
Wed, Apr 10, 8:14 AM
Unknown Object (File)
Mon, Apr 8, 10:29 AM
Unknown Object (File)
Sat, Apr 6, 6:34 AM
Unknown Object (File)
Fri, Apr 5, 4:22 AM
Unknown Object (File)
Fri, Apr 5, 4:22 AM
Unknown Object (File)
Fri, Apr 5, 4:22 AM
Subscribers

Details

Summary

The reducer deletes an entry in the store. In the future we will have to do more here, as not only public links can be disabled.

Depends on D7906

Test Plan

Confirm disabling a link and check if it was deleted, e.g. by verifying that disable link button disappears.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.May 22 2023, 6:47 AM

I think the differential name is not complete and confusing a bit

lib/reducers/invite-links-reducer.js
44 ↗(On Diff #26774)

I would move currentPrimaryLink?.name === action.payload.name condition to if upper, and avoid modifying the state if it's falsy

This revision is now accepted and ready to land.May 22 2023, 10:44 AM
In D7907#234718, @kamil wrote:

I think the differential name is not complete and confusing a bit

It seems so... not sure what happened

tomek retitled this revision from [lib] Add reducer and endpoint calling code to [lib] Allow calling link-disabling endpoint.May 23 2023, 6:52 AM

Make reducer more efficient

This revision was automatically updated to reflect the committed changes.