Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Adds view on map button to Artworks component
Browse files Browse the repository at this point in the history
  • Loading branch information
kierangillen committed Nov 30, 2018
1 parent 2613929 commit 1e35698
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
Binary file added images/map.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/lib/Scenes/Show/Components/Artworks/index.tsx
Expand Up @@ -15,7 +15,7 @@ export class Artworks extends React.Component<Props> {
}
return (
<>
<Serif size="5" my={1}>
<Serif size="6" my={1}>
All works
</Serif>
<GenericGrid artworks={this.props.show.artworks} />
Expand Down
22 changes: 19 additions & 3 deletions src/lib/Scenes/Show/Components/Shows/index.tsx
@@ -1,19 +1,35 @@
import { Serif } from "@artsy/palette"
import { Box, Flex, Sans, Serif } from "@artsy/palette"
import { Shows_show } from "__generated__/Shows_show.graphql"
import React from "react"
import { FlatList } from "react-native"
import { FlatList, Image, TouchableOpacity } from "react-native"
import { createFragmentContainer, graphql } from "react-relay"
import { ShowItemContainer as ShowItem } from "./Components/ShowItem"

interface Props {
show: Shows_show
handleViewOnMap: () => void
}

export const Shows: React.SFC<Props> = ({ show }) => {
const handleViewOnMap = () => {
// TODO: Show view on map view when clicked
console.log("clicked view on map")
}

const { edges } = show.nearbyShows
return (
<>
<Serif size="5">More Shows</Serif>
<Flex justifyContent="space-between" alignItems="center" flexDirection="row">
<Serif size="5">More Shows</Serif>
<TouchableOpacity onPress={() => handleViewOnMap()}>
<Flex alignItems="center" flexDirection="row">
<Sans size="2">View on map</Sans>
<Box ml={1} mr={1}>
<Image style={{ width: 20, height: 22 }} source={require("../../../../../../images/map.png")} />
</Box>
</Flex>
</TouchableOpacity>
</Flex>
<FlatList
horizontal
data={edges}
Expand Down

0 comments on commit 1e35698

Please sign in to comment.