mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
Merge branch 'master' into change-websocket-uri
This commit is contained in:
@@ -8,7 +8,7 @@ const StorySearch = (props) => {
|
||||
|
||||
const {
|
||||
root: {
|
||||
assets = []
|
||||
assets,
|
||||
},
|
||||
data: {loading}
|
||||
} = props;
|
||||
@@ -62,7 +62,7 @@ const StorySearch = (props) => {
|
||||
{
|
||||
loading
|
||||
? <Spinner />
|
||||
: assets.map((story, i) => {
|
||||
: assets.nodes.map((story, i) => {
|
||||
const storyOpen = story.closedAt === null || new Date(story.closedAt) > new Date();
|
||||
|
||||
return <Story
|
||||
@@ -77,7 +77,7 @@ const StorySearch = (props) => {
|
||||
})
|
||||
}
|
||||
|
||||
{assets.length === 0 && <div className={styles.noResults}>No results</div>}
|
||||
{assets.nodes.length === 0 && <div className={styles.noResults}>No results</div>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -89,12 +89,14 @@ class StorySearchContainer extends React.Component {
|
||||
export const withAssetSearchQuery = withQuery(gql`
|
||||
query SearchStories($value: String = "") {
|
||||
assets(query: {value: $value, limit: 10}) {
|
||||
id
|
||||
title
|
||||
url
|
||||
created_at
|
||||
closedAt
|
||||
author
|
||||
nodes {
|
||||
id
|
||||
title
|
||||
url
|
||||
created_at
|
||||
closedAt
|
||||
author
|
||||
}
|
||||
}
|
||||
}
|
||||
`, {
|
||||
|
||||
Reference in New Issue
Block a user