import React from "react";
import { View } from "react-native";
import { withRouter } from "react-router";

import ListingProvider from "../app/ListingProvider";
import PostListSort from "../components/PostListSort";
import PostList from "../components/PostList";

class ListingResolver extends React.Component {
  render() {
    return (
      <View>
        <ListingProvider pathname="/">
          {({ data }) => {
            const posts = data.listing.posts;
            return (
              <View>
                <PostListSort />
                <PostList posts={posts} />
              </View>
            );
          }}
        </ListingProvider>
      </View>
    );
  }
}

export default withRouter(ListingResolver);

@@ -319,16 +319,112 @@
 der() %7B%0A
+    const %7B location %7D = this.props;%0A    const pathname = location.pathname + location.search;%0A%0A
     retu
@@ -479,11 +479,18 @@
 ame=
-%22/%22
+%7Bpathname%7D
 %3E%0A  

Use real pathname from location