aboutsummaryrefslogtreecommitdiff
path: root/src/screens/profile/CaptionScreen.tsx
diff options
context:
space:
mode:
authorAshm Walia <40498934+ashmgarv@users.noreply.github.com>2020-10-18 16:37:32 -0700
committerGitHub <noreply@github.com>2020-10-18 19:37:32 -0400
commitab7fa09af967e0a8cf2ca53dfb24f8bc8a6886f7 (patch)
tree898e7aa42529eda91964ac1a18aa1881689554f2 /src/screens/profile/CaptionScreen.tsx
parent79d237f616c37940f5d476eb1dca6b5d05cf148a (diff)
[TMA 279] Ability to search and view someone's profile (#58)
* Batch one : major changes * WIP checkpoint * The one before the final touch * Probable final touch * ran yarn lint D: * linter broke something * fixed a small bug * Addressed a small nitpick * Well abstracted now Co-authored-by: Ivan Chen <ivan@thetaggid.com>
Diffstat (limited to 'src/screens/profile/CaptionScreen.tsx')
-rw-r--r--src/screens/profile/CaptionScreen.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index e3040509..53c47a6d 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -42,14 +42,14 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
setCaption(caption);
};
- const checkImageUploadStatus = (statusMap : object) => {
- for(let [key, value] of Object.entries(statusMap)){
- if (value != "Success"){
+ const checkImageUploadStatus = (statusMap: object) => {
+ for (let [key, value] of Object.entries(statusMap)) {
+ if (value != 'Success') {
return false;
}
}
return true;
- }
+ };
const handleShare = async () => {
try {
@@ -68,7 +68,7 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
});
request.append('moment', title);
request.append('user_id', userId);
- request.append('captions', JSON.stringify({'image':caption}));
+ request.append('captions', JSON.stringify({image: caption}));
let response = await fetch(MOMENTS_UPLOAD_ENDPOINT, {
method: 'POST',
headers: {