Skip to content

Commit 78216fb

Browse files
authored
Fixed the ui related issue for profile and user page (#1065)
* fix/edit profile button fix, user invite modal fix Signed-off-by: Sujit <sujit.sutar@ayanworks.com> * fix/profile edit button Signed-off-by: Sujit <sujit.sutar@ayanworks.com> --------- Signed-off-by: Sujit <sujit.sutar@ayanworks.com>
1 parent 61e8aa7 commit 78216fb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

nextjs/src/features/invitations/components/sendInvitations.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ export default function SendInvitationModal({
154154

155155
return (
156156
<Dialog open={openModal} onOpenChange={setOpenModal}>
157-
<DialogContent className="sm:max-w-2xl">
157+
<DialogContent
158+
className="sm:max-w-2xl"
159+
onOpenAutoFocus={(e) => e.preventDefault()}
160+
>
158161
<DialogHeader>
159162
<DialogTitle>Send Invitation(s)</DialogTitle>
160163
</DialogHeader>
@@ -170,6 +173,7 @@ export default function SendInvitationModal({
170173
<Formik
171174
initialValues={{ email: '' }}
172175
validationSchema={validationSchema}
176+
validateOnMount={false}
173177
onSubmit={(values, formikHandlers) => {
174178
formikHandlers.resetForm()
175179
validateAndAddEmail(values)
@@ -187,6 +191,7 @@ export default function SendInvitationModal({
187191
as={Input}
188192
id="email"
189193
name="email"
194+
autoFocus={false}
190195
placeholder="example@email.com"
191196
className={`bg-background placeholder:text-muted-foreground/50 focus-visible:ring-1 ${
192197
errors.email && touched.email

nextjs/src/features/profile/components/DisplayUserProfile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ const DisplayUserProfile = ({
124124
</div>
125125

126126
<Button
127-
className="bg-transparent hover:bg-transparent"
127+
variant={'ghost'}
128128
type="button"
129129
size="icon"
130130
onClick={toggleEditProfile}
131131
>
132132
<span>
133-
<Edit className="text-foreground mr-12" />
133+
<Edit className="" />
134134
</span>
135135
</Button>
136136
</div>

0 commit comments

Comments
 (0)