Solved some more bugs and styling
This commit is contained in:
@@ -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()}
|
||||
|
||||
Reference in New Issue
Block a user