Fixed feed page error

This commit is contained in:
mistikk 2018-09-22 20:58:37 +03:00
parent e3f0252d3e
commit 944862a132
4 changed files with 24 additions and 24 deletions

38
package-lock.json generated
View File

@ -2455,7 +2455,7 @@
}, },
"buffer": { "buffer": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz", "resolved": "http://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz",
"integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=", "integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=",
"requires": { "requires": {
"base64-js": "0.0.8", "base64-js": "0.0.8",
@ -2606,9 +2606,9 @@
"integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I="
}, },
"chownr": { "chownr": {
"version": "1.0.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
"integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g=="
}, },
"ci-info": { "ci-info": {
"version": "1.4.0", "version": "1.4.0",
@ -7732,9 +7732,9 @@
"dev": true "dev": true
}, },
"needle": { "needle": {
"version": "2.2.2", "version": "2.2.3",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.2.2.tgz", "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.3.tgz",
"integrity": "sha512-mW7W8dKuVYefCpNzE3Z7xUmPI9wSrSL/1qH31YGMxmSOAnjatS3S9Zv3cmiHrhx3Jkp1SrWWBdOFXjfF48Uq3A==", "integrity": "sha512-GPL22d/U9cai87FcCPO6e+MT3vyHS2j+zwotakDc7kE2DtUAqFKMXLJCTtRp+5S75vXIwQPvIxkvlctxf9q4gQ==",
"requires": { "requires": {
"debug": "^2.1.2", "debug": "^2.1.2",
"iconv-lite": "^0.4.4", "iconv-lite": "^0.4.4",
@ -9106,9 +9106,9 @@
} }
}, },
"realm": { "realm": {
"version": "2.15.3", "version": "2.16.1",
"resolved": "https://registry.npmjs.org/realm/-/realm-2.15.3.tgz", "resolved": "https://registry.npmjs.org/realm/-/realm-2.16.1.tgz",
"integrity": "sha512-F1wIYI8YTc3fJQnHtr+QFZKHyezszFQApdOildtyZZl8HAn+kRWnINEl/iasbkw4SaQGTzWT4cMMYcCEBNzS/A==", "integrity": "sha512-OoN1SVu0BtiKkU6svEEr9/twfCIdVjq98lWXASccGL8Qm4DLhu0NUTP0W5Iv5Rb5jjgiwYGWghPD6yoQu2143A==",
"requires": { "requires": {
"command-line-args": "^4.0.6", "command-line-args": "^4.0.6",
"decompress": "^4.2.0", "decompress": "^4.2.0",
@ -9791,7 +9791,7 @@
"dependencies": { "dependencies": {
"commander": { "commander": {
"version": "2.8.1", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", "resolved": "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
"integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=",
"requires": { "requires": {
"graceful-readlink": ">= 1.0.0" "graceful-readlink": ">= 1.0.0"
@ -10536,16 +10536,16 @@
} }
}, },
"tar-stream": { "tar-stream": {
"version": "1.6.1", "version": "1.6.2",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
"integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
"requires": { "requires": {
"bl": "^1.0.0", "bl": "^1.0.0",
"buffer-alloc": "^1.1.0", "buffer-alloc": "^1.2.0",
"end-of-stream": "^1.0.0", "end-of-stream": "^1.0.0",
"fs-constants": "^1.0.0", "fs-constants": "^1.0.0",
"readable-stream": "^2.3.0", "readable-stream": "^2.3.0",
"to-buffer": "^1.1.0", "to-buffer": "^1.1.1",
"xtend": "^4.0.0" "xtend": "^4.0.0"
} }
}, },
@ -11093,9 +11093,9 @@
"integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po="
}, },
"unbzip2-stream": { "unbzip2-stream": {
"version": "1.2.5", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.0.tgz",
"integrity": "sha512-izD3jxT8xkzwtXRUZjtmRwKnZoeECrfZ8ra/ketwOcusbZEp4mjULMnJOCfTDZBgGQAAY1AJ/IgxcwkavcX9Og==", "integrity": "sha512-kE2WkurNnPUMcryNioS68DDbhoPB8Qxsd8btHSj+sd5Pjh2GsjmeHLzMSqV9HHziAo8FzVxVCJl9ZYhk7yY1pA==",
"requires": { "requires": {
"buffer": "^3.0.1", "buffer": "^3.0.1",
"through": "^2.3.6" "through": "^2.3.6"

View File

@ -58,6 +58,7 @@ class FeedPage extends React.Component {
this.props.user.name this.props.user.name
) )
.then(result => { .then(result => {
// TODO: We should put null check for result
this.setState({ this.setState({
isReady: true, isReady: true,
posts: result, posts: result,

View File

@ -175,7 +175,9 @@ export default class LoggedInSideBar extends React.Component {
/> />
<View style={styles.info}> <View style={styles.info}>
<Text style={styles.userLabel}> <Text style={styles.userLabel}>
{this.state.json_metadata.name || ""} {(this.state.json_metadata &&
this.state.json_metadata.name) ||
""}
</Text> </Text>
<Text style={styles.username}> <Text style={styles.username}>
@{this.state.user.name} @{this.state.user.name}

View File

@ -1,12 +1,10 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { View, Text } from "react-native"; import { View } from "react-native";
import { Navigation } from "react-native-navigation";
import LoggedInMenu from "./side-menu/loggedInMenu"; import LoggedInMenu from "./side-menu/loggedInMenu";
import LoggedOutMenu from "./side-menu/loggedOutMenu"; import LoggedOutMenu from "./side-menu/loggedOutMenu";
import { getAuthStatus, getUserData } from "../realm/realm"; import { getAuthStatus, getUserData } from "../realm/realm";
import { getUser } from "../providers/steem/dsteem";
class SideMenuScreen extends Component { class SideMenuScreen extends Component {
constructor() { constructor() {
@ -20,7 +18,6 @@ class SideMenuScreen extends Component {
async componentDidMount() { async componentDidMount() {
let user; let user;
let userData;
let isLoggedIn; let isLoggedIn;
await getAuthStatus().then(res => { await getAuthStatus().then(res => {