@remit/ui 0.0.148 → 0.0.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/ui",
3
- "version": "0.0.148",
3
+ "version": "0.0.149",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src"
@@ -100,23 +100,12 @@ function Harness({
100
100
  const [displayNames, setDisplayNames] = useState<Record<string, string>>({});
101
101
 
102
102
  const handleAppoint = (role: FolderRole, mailboxId: string | null) => {
103
- setAppointments((prev) => {
104
- const next: Record<string, RoleAppointment> = {
105
- ...prev,
106
- [role]: mailboxId
107
- ? { mailboxId, source: "Appointed" }
108
- : { mailboxId: null, source: "None" },
109
- };
110
- // Exclusivity: appointing a folder to one role clears it from any other.
111
- if (mailboxId) {
112
- for (const other of Object.keys(next)) {
113
- if (other === role) continue;
114
- if (next[other]?.mailboxId !== mailboxId) continue;
115
- next[other] = { mailboxId: null, source: "None" };
116
- }
117
- }
118
- return next;
119
- });
103
+ setAppointments((prev) => ({
104
+ ...prev,
105
+ [role]: mailboxId
106
+ ? { mailboxId, source: "Appointed" }
107
+ : { mailboxId: null, source: "None" },
108
+ }));
120
109
  };
121
110
 
122
111
  const handleRename = (mailboxId: string, name: string) =>
@@ -300,10 +300,9 @@ export function RoleAppointmentList({
300
300
  </h2>
301
301
  <p className="text-xs text-fg-muted">
302
302
  Each role points to one folder. Pick the folder that holds the mail —
303
- the counts help you tell real folders from empty look-alikes.
304
- Appointing a folder here removes it from any other role. Each row says
305
- where its answer came from — your choice, the mail server's own flag,
306
- or a name reader matched.
303
+ the counts help you tell real folders from empty look-alikes. Each row
304
+ says where its answer came from your choice, the mail server's own
305
+ flag, or a name reader matched.
307
306
  </p>
308
307
  </header>
309
308
  <div className="rounded-sm border border-line bg-surface">