Skip to content

Commit 032192d

Browse files
Merge pull request #3 from designbycode/feature/avatar-upload-fix
Fix: Correct avatar display and form notifications
2 parents 711bd8f + 99db23e commit 032192d

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

resources/js/pages/settings/password.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@ export default function Password() {
3434

3535
<Form
3636
{...PasswordController.update.form()}
37-
options={{
38-
preserveScroll: true,
39-
onSuccess: () => {
40-
toast.success('Password updated', {
41-
description: 'Your password has been updated successfully.',
42-
});
43-
},
37+
onSuccess={() => {
38+
toast.success('Password updated', {
39+
description: 'Your password has been updated successfully.',
40+
});
41+
4442
}}
43+
preserveScroll
4544
resetOnError={['password', 'password_confirmation', 'current_password']}
4645
resetOnSuccess
4746
onError={(errors) => {

resources/js/pages/settings/profile.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail:
3939

4040
<Form
4141
{...ProfileController.update.form()}
42-
options={{
43-
preserveScroll: true,
44-
onSuccess: () => {
45-
toast.success('Profile updated', {
46-
description: 'Your profile has been updated successfully.',
47-
});
48-
},
42+
onSuccess={() => {
43+
toast.success('Profile updated', {
44+
description: 'Your profile has been updated successfully.',
45+
});
46+
4947
}}
48+
preserveScroll
5049
className="space-y-6"
5150
>
5251
{({ processing, errors }) => (

resources/js/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface User {
3434
id: number;
3535
name: string;
3636
email: string;
37-
avatar?: string;
37+
avatar: string;
3838
email_verified_at: string | null;
3939
created_at: string;
4040
updated_at: string;

0 commit comments

Comments
 (0)