Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bugs & improvements #3189

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions web/components/profile/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export const ProfileSidebar = () => {
className="h-full w-full rounded object-cover"
/>
) : (
<div className="flex h-[52px] w-[52px] items-center justify-center rounded bg-custom-background-90 text-custom-text-100">
{userProjectsData.user_data.display_name?.[0]}
<div className="flex h-[52px] w-[52px] items-center justify-center rounded bg-custom-background-90 text-custom-text-100 capitalize">
{userProjectsData.user_data.first_name?.[0]}
</div>
)}
</div>
Expand Down Expand Up @@ -149,8 +149,8 @@ export const ProfileSidebar = () => {
completedIssuePercentage <= 35
? "bg-red-500/10 text-red-500"
: completedIssuePercentage <= 70
? "bg-yellow-500/10 text-yellow-500"
: "bg-green-500/10 text-green-500"
? "bg-yellow-500/10 text-yellow-500"
: "bg-green-500/10 text-green-500"
}`}
>
{completedIssuePercentage}%
Expand Down
8 changes: 7 additions & 1 deletion web/components/workspace/send-workspace-invitation-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export const SendWorkspaceInvitationModal: React.FC<Props> = observer((props) =>
append({ email: "", role: 15 });
};

const onSubmitForm = async (data: FormValues) => {
await onSubmit(data)?.then(() => {
reset(defaultValues);
});
};

useEffect(() => {
if (fields.length === 0) append([{ email: "", role: 15 }]);
}, [fields, append]);
Expand Down Expand Up @@ -100,7 +106,7 @@ export const SendWorkspaceInvitationModal: React.FC<Props> = observer((props) =>
>
<Dialog.Panel className="relative translate-y-0 transform rounded-lg bg-custom-background-100 p-5 text-left opacity-100 shadow-custom-shadow-md transition-all sm:w-full sm:max-w-2xl sm:scale-100">
<form
onSubmit={handleSubmit(onSubmit)}
onSubmit={handleSubmit(onSubmitForm)}
onKeyDown={(e) => {
if (e.code === "Enter") e.preventDefault();
}}
Expand Down
Loading