mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
working TS implementation of twitter app
This commit is contained in:
1 parent
2920267ef3
commit
f0be5b3f8c
12 files changed
+372
-350
No files matched your search
@@ -147,7 +147,6 @@ export const AddTweetModal = () => {
|
||||
const toggleShowEmoji = () => {
|
||||
// clear the images so we can seemlessly toggle between emoji/images
|
||||
setShowImagePrompt(false);
|
||||
setImages([]);
|
||||
setShowEmoji(!showEmoji);
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export function Profile() {
|
||||
// Annoyingling adding conditionals above this line to not render
|
||||
// when profile === null results in a react error that different
|
||||
// amounts of hooks are rendering
|
||||
const [avatarUrl, handleAvatarChange] = useState(profile.avatar_url);
|
||||
const [avatarUrl, handleAvatarChange] = useState(profile.avatar_url || "");
|
||||
const [name, handleNameChange] = useState(profile.profile_name || "");
|
||||
const [bio, handleBioChange] = useState(profile.bio || "");
|
||||
const [location, handleLocationChange] = useState(profile.location || "");
|
||||
|
||||
@@ -43,7 +43,7 @@ export const useTwitterService = () => {
|
||||
);
|
||||
|
||||
const _setProfile = (profile) => {
|
||||
setProfile(profile[0]); // server returns an array of 1 profile
|
||||
setProfile(profile);
|
||||
};
|
||||
const _setUpdateProfileSuccess = (isSuccessful) => {
|
||||
setUpdateProfileSuccess(isSuccessful);
|
||||
|
||||
Reference in new issue
Block a user