mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Prevent replacement of identical username fields
This commit is contained in:
@@ -48,9 +48,6 @@ export const useAuthStore = create<AuthSlice>()(
|
|||||||
accessToken: '',
|
accessToken: '',
|
||||||
addServerCredential: (options) => {
|
addServerCredential: (options) => {
|
||||||
set((state) => {
|
set((state) => {
|
||||||
state.serverCredentials = state.serverCredentials.filter(
|
|
||||||
(c) => c.username !== options.username
|
|
||||||
);
|
|
||||||
state.serverCredentials.push(options);
|
state.serverCredentials.push(options);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user