-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Feedback to UserProfile #349
Conversation
Xavier-Charles
commented
Mar 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Charles
const prevIsSavingProfile = usePrevious(isSavingProfile); | ||
|
||
useEffect(() => { | ||
if (prevIsSavingProfile === true && isSavingProfile === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh I'm okay with this, but I think we can have this check and state chaneg outside of the effect,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the effect looks unnecessary
@@ -102,6 +104,14 @@ const UserSettings: FC<IUserSettings> = ({ | |||
const [showProfileEditModal, setShowProfileEditModal] = | |||
useState<boolean>(false); | |||
const history = useHistory(); | |||
const [isProfileUpdated, setisProfileUpdated] = useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix this declaration, it should be setIsProfileUpdated
unless I'm missing something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Xavier-Charles
isSavingProfile || | ||
handle === undefined || | ||
profile?.handle === handle | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
a1f2b01
to
a53a4ef
Compare