Skip to content

Commit

Permalink
refactor: move gravity mediums to the same folder as my collection me…
Browse files Browse the repository at this point in the history
…diums
  • Loading branch information
MounirDhahri committed Oct 17, 2023
1 parent f89cd94 commit 901a4e6
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 89 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { OwnerType } from "@artsy/cohesion"
import { fireEvent, waitFor } from "@testing-library/react-native"
import {
SavedSearchFilterAdditionalGeneIDs,
gravityArtworkMediumCategories,
} from "app/Scenes/SavedSearchAlert/Components/SavedSearchFilterAdditionalGeneIDs"
import { SavedSearchFilterAdditionalGeneIDs } from "app/Scenes/SavedSearchAlert/Components/SavedSearchFilterAdditionalGeneIDs"
import {
SavedSearchModel,
SavedSearchStoreProvider,
savedSearchModel,
} from "app/Scenes/SavedSearchAlert/SavedSearchStore"
import { gravityArtworkMediumCategories } from "app/utils/artworkMediumCategories"
import { renderWithWrappers } from "app/utils/tests/renderWithWrappers"

const black100Hex = "#000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SearchCriteria } from "app/Components/ArtworkFilter/SavedSearch/types"
import { SavedSearchFilterPill } from "app/Scenes/SavedSearchAlert/Components/SavedSearchFilterPill"
import { SavedSearchStore } from "app/Scenes/SavedSearchAlert/SavedSearchStore"
import { isValueSelected, useSearchCriteriaAttributes } from "app/Scenes/SavedSearchAlert/helpers"
import { gravityArtworkMediumCategories } from "app/utils/artworkMediumCategories"
import { useState } from "react"
import { LayoutAnimation, TouchableOpacity } from "react-native"

Expand Down Expand Up @@ -103,87 +104,3 @@ export const SavedSearchFilterAdditionalGeneIDs = () => {
</Flex>
)
}

// List from gravity
export const gravityArtworkMediumCategories: { label: string; value: string }[] = [
{
label: "Architecture",
value: "architecture-1",
},
{
label: "Books and Portfolios",
value: "books-and-portfolios",
},
{
label: "Design",
value: "design",
},
{
label: "Work on Paper",
value: "work-on-paper",
},
{
label: "Ephemera or Merchandise",
value: "ephemera-or-merchandise",
},
{
label: "Fashion Design and Wearable Art",
value: "fashion-design-and-wearable-art",
},
{
label: "Installation",
value: "installation",
},
{
label: "Jewelry",
value: "jewelry",
},
{
label: "Mixed-Media",
value: "mixed-media",
},
{
label: "NFT",
value: "nft",
},
{
label: "Other",
value: "other",
},
{
label: "Painting",
value: "painting",
},
{
label: "Performance Art",
value: "performance-art",
},
{
label: "Photography",
value: "photography",
},
{
label: "Poster",
value: "poster",
},
{
label: "Prints",
value: "prints",
},
{
label: "Reproduction",
value: "reproduction",
},
{
label: "Sculpture",
value: "sculpture",
},
{
label: "Textile Arts",
value: "textile-arts",
},
{
label: "Film/Video",
value: "film-slash-video",
},
]
2 changes: 1 addition & 1 deletion src/app/Scenes/SavedSearchAlert/pillExtractors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import {
SearchCriteria,
SearchCriteriaAttributes,
} from "app/Components/ArtworkFilter/SavedSearch/types"
import { gravityArtworkMediumCategories } from "app/Scenes/SavedSearchAlert/Components/SavedSearchFilterAdditionalGeneIDs"
import { Metric } from "app/Scenes/Search/UserPrefsModel"
import { gravityArtworkMediumCategories } from "app/utils/artworkMediumCategories"
import { compact, flatten, isNil, isUndefined, keyBy } from "lodash"
import { SavedSearchPill } from "./SavedSearchAlertModel"

Expand Down
85 changes: 85 additions & 0 deletions src/app/utils/artworkMediumCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ interface Medium {
value: string
}

// List for my collection accepted mediums/categories
export const artworkMediumCategories: Medium[] = [
{ label: "Painting", value: "Painting" },
{ label: "Sculpture", value: "Sculpture" },
Expand All @@ -28,3 +29,87 @@ export const artworkMediumCategories: Medium[] = [
{ label: "Reproduction", value: "Reproduction" },
{ label: "NFT", value: "NFT" },
]

// List for medium/categories available in Gravity
export const gravityArtworkMediumCategories: { label: string; value: string }[] = [
{
label: "Architecture",
value: "architecture-1",
},
{
label: "Books and Portfolios",
value: "books-and-portfolios",
},
{
label: "Design",
value: "design",
},
{
label: "Work on Paper",
value: "work-on-paper",
},
{
label: "Ephemera or Merchandise",
value: "ephemera-or-merchandise",
},
{
label: "Fashion Design and Wearable Art",
value: "fashion-design-and-wearable-art",
},
{
label: "Installation",
value: "installation",
},
{
label: "Jewelry",
value: "jewelry",
},
{
label: "Mixed-Media",
value: "mixed-media",
},
{
label: "NFT",
value: "nft",
},
{
label: "Other",
value: "other",
},
{
label: "Painting",
value: "painting",
},
{
label: "Performance Art",
value: "performance-art",
},
{
label: "Photography",
value: "photography",
},
{
label: "Poster",
value: "poster",
},
{
label: "Prints",
value: "prints",
},
{
label: "Reproduction",
value: "reproduction",
},
{
label: "Sculpture",
value: "sculpture",
},
{
label: "Textile Arts",
value: "textile-arts",
},
{
label: "Film/Video",
value: "film-slash-video",
},
]

0 comments on commit 901a4e6

Please sign in to comment.