Solved some more bugs and styling

This commit is contained in:
Tiago Ribeiro
2023-07-25 00:09:25 +01:00
parent 581adbb56e
commit 02260d496c
16 changed files with 36 additions and 24 deletions

View File

@@ -100,7 +100,7 @@ export default function Home() {
return;
}
const request = await axios.post("/api/users/update", {bio, name, email, password, newPassword});
const request = await axios.post("/api/users/update", {bio, name, email, password, newPassword, profilePicture});
if (request.status === 200) {
toast.success("Your profile has been updated!");
setTimeout(() => router.reload(), 800);
@@ -166,7 +166,11 @@ export default function Home() {
</form>
</div>
<div className="flex flex-col gap-3 items-center w-48">
<img src={profilePicture} alt={user.name} className="aspect-square h-48 w-48 rounded-full drop-shadow-xl self-end" />
<img
src={profilePicture}
alt={user.name}
className="aspect-square h-48 w-48 rounded-full drop-shadow-xl self-end object-cover"
/>
<input type="file" className="hidden" onChange={uploadProfilePicture} accept="image/*" ref={profilePictureInput} />
<span
onClick={() => (profilePictureInput.current as any)?.click()}