mirror of
https://github.com/SkalaraAI/skbeta.git
synced 2025-04-09 15:00:18 -04:00
fix (ui): shows correct toast when there is no error adding user to workspace
This commit is contained in:
parent
93c68014bf
commit
afdfb51e7c
|
@ -48,7 +48,7 @@ export function WorkspaceSettings() {
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
const res = await data.json();
|
const res = await data.json();
|
||||||
if (res.status === 200) {
|
if ((res.message = "Success!")) {
|
||||||
toast({
|
toast({
|
||||||
variant: "default",
|
variant: "default",
|
||||||
title: "User added to workspace!",
|
title: "User added to workspace!",
|
||||||
|
@ -58,7 +58,7 @@ export function WorkspaceSettings() {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Uh oh! Something went wrong.",
|
title: "Uh oh! Something went wrong.",
|
||||||
description: res.error,
|
description: res.message,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -133,7 +133,7 @@ export function WorkspaceSettings() {
|
||||||
<div className="flex items-center justify-between space-x-4">
|
<div className="flex items-center justify-between space-x-4">
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
<Avatar>
|
<Avatar>
|
||||||
<AvatarImage src="/avatars/03.png" />
|
<AvatarImage />
|
||||||
<AvatarFallback>
|
<AvatarFallback>
|
||||||
{email.slice(0, 2).toUpperCase()}
|
{email.slice(0, 2).toUpperCase()}
|
||||||
</AvatarFallback>
|
</AvatarFallback>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user