Skip to content

Commit f84456f

Browse files
committed
few more improvements
1 parent a68c259 commit f84456f

File tree

4 files changed

+21
-54
lines changed

4 files changed

+21
-54
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://cdn.devdojo.com/assets/svg/laravel-react-logo.svg" width="300" alt="Laravel Logo"></a></p>
22

33
<p align="center">
4-
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
5-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
4+
<a href="github.com/laravel/react-starter-kit/actions"><img src="https://github.com/laravel/react-starter-kit/workflows/tests/badge.svg" alt="Build Status"></a>
75
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
86
</p>
97

app/Http/Controllers/Settings/ProfileController.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,4 @@ public function update(ProfileUpdateRequest $request): RedirectResponse
4040

4141
return Redirect::route('profile.edit');
4242
}
43-
44-
/**
45-
* Delete the user's account.
46-
*/
47-
public function destroy(Request $request): RedirectResponse
48-
{
49-
$request->validate([
50-
'password' => ['required', 'current_password'],
51-
]);
52-
53-
$user = $request->user();
54-
55-
Auth::logout();
56-
57-
$user->delete();
58-
59-
$request->session()->invalidate();
60-
$request->session()->regenerateToken();
61-
62-
return Redirect::to('/');
63-
}
6443
}

components.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
4-
"rsc": false,
5-
"tsx": true,
6-
"tailwind": {
7-
"config": "tailwind.config.js",
8-
"css": "resources/css/app.css",
9-
"baseColor": "neutral",
10-
"cssVariables": true,
11-
"prefix": ""
12-
},
13-
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/utils",
16-
"ui": "@/components/ui",
17-
"lib": "@/lib",
18-
"hooks": "@/hooks"
19-
},
20-
"iconLibrary": "lucide"
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.js",
8+
"css": "resources/css/app.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/Components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/Components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
2121
}

resources/js/Pages/Settings/Delete.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,7 @@ export default function DeleteUserForm({
4242
const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false);
4343
const passwordInput = useRef<HTMLInputElement>(null);
4444

45-
const {
46-
data,
47-
setData,
48-
delete: destroy,
49-
processing,
50-
reset,
51-
errors,
52-
clearErrors,
53-
} = useForm({
54-
password: '',
55-
});
45+
const { data, setData, delete: destroy, processing, reset, errors, clearErrors } = useForm({ password: '' });
5646

5747
const confirmUserDeletion = () => {
5848
setConfirmingUserDeletion(true);

0 commit comments

Comments
 (0)