From 483a196916c3be3225d04cd7fcf76f5cab86bfbd Mon Sep 17 00:00:00 2001 From: Devlin Date: Fri, 7 Jan 2022 17:49:02 -0800 Subject: [PATCH] Implemented remove avatar functionality --- .../userProfileSettings/UserProfileSettings.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/userSettings/settingsView/userProfileSettings/UserProfileSettings.tsx b/src/components/userSettings/settingsView/userProfileSettings/UserProfileSettings.tsx index f227158..d191f11 100644 --- a/src/components/userSettings/settingsView/userProfileSettings/UserProfileSettings.tsx +++ b/src/components/userSettings/settingsView/userProfileSettings/UserProfileSettings.tsx @@ -2,6 +2,7 @@ import { useEffect } from "react"; import tw from "tailwind-styled-components/dist/tailwind"; import { setUserAbout, + setUserAvatar, setUserBanner, useUserState, } from "../../../../features/user"; @@ -45,6 +46,14 @@ export default function UserProfileSettings() { dispatch(setUserAbout(e.target.value)); } + function removeAvatar() { + dispatch( + setUserAvatar( + "https://firebasestorage.googleapis.com/v0/b/banter-69832.appspot.com/o/users%2FdefaultProfilePicture.svg?alt=media&token=ec6842ea-d2e6-44b8-b6d4-2abcc747d787" + ) + ); + } + return ( User Profile @@ -63,7 +72,9 @@ export default function UserProfileSettings() { Change Avatar - Remove Avatar + + Remove Avatar +