Skip to content

Commit

Permalink
chore: Move Sell landing and FAQ page to Sell app (#14413)
Browse files Browse the repository at this point in the history
* chore: Move Sell landing page and faq page to Sell app

* comment
  • Loading branch information
olerichter00 authored Aug 29, 2024
1 parent fc89a28 commit c6bcf02
Show file tree
Hide file tree
Showing 37 changed files with 104 additions and 100 deletions.
41 changes: 0 additions & 41 deletions src/Apps/Consign/consignRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ const ConsignmentInquiryContainer = loadable(
}
)

const MarketingLandingApp = loadable(
() =>
import(
/* webpackChunkName: "consignBundle" */ "./Routes/MarketingLanding/MarketingLandingApp"
),
{
resolveComponent: component => component.MarketingLandingApp,
}
)

const FAQApp = loadable(
() =>
import(
/* webpackChunkName: "consignBundle" */ "./Routes/SubmissionFlow/FAQ/FAQApp"
),
{
resolveComponent: component => component.FAQApp,
}
)

const renderConsignmentInquiry = ({ Component, props }: RouteRenderArgs) => {
if (!(Component && props)) {
return undefined
Expand All @@ -61,27 +41,6 @@ const renderConsignmentInquiry = ({ Component, props }: RouteRenderArgs) => {
}

export const consignRoutes: RouteProps[] = [
{
path: "/sell",
children: [
{
path: "/",
layout: "FullBleed",
getComponent: () => MarketingLandingApp,
onClientSideRender: () => {
MarketingLandingApp.preload()
},
},
{
path: "faq",
layout: "NavOnly",
getComponent: () => FAQApp,
onClientSideRender: () => {
FAQApp.preload()
},
},
],
},
{
path: "/sell/inquiry",
getComponent: () => ConsignmentInquiryContainer,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Expandable, Join, Spacer, Text } from "@artsy/palette"
import { ContextModule, OwnerType } from "@artsy/cohesion"
import * as DeprecatedAnalyticsSchema from "@artsy/cohesion/dist/DeprecatedSchema"
import { Expandable, Join, Spacer, Text } from "@artsy/palette"
import { useTracking } from "react-tracking"
import { ContextModule, OwnerType } from "@artsy/cohesion"
import { RouterLink } from "System/Components/RouterLink"

export interface FAQProps {
Expand Down Expand Up @@ -131,8 +131,12 @@ export const FAQ: React.FC<FAQProps> = ({ shouldTrackClickEvent }) => {
Frequently Asked Questions
</Text>
<Join separator={<Spacer y={4} />}>
{FAQList.map(({ label, value }) => (
<Expandable onFocus={() => trackClickedFAQ(label)} label={label}>
{FAQList.map(({ label, value }, index) => (
<Expandable
onFocus={() => trackClickedFAQ(label)}
label={label}
key={index}
>
{value}
</Expandable>
))}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box } from "@artsy/palette"
import { FAQ } from "Apps/Consign/Routes/SubmissionFlow/FAQ/FAQ"
import { FAQ } from "Apps/Sell/Routes/FAQ/FAQ"
import { useSystemContext } from "System/Hooks/useSystemContext"

export const FAQApp = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as DeprecatedAnalyticsSchema from "@artsy/cohesion/dist/DeprecatedSchema"
import { FAQ } from "Apps/Consign/Routes/SubmissionFlow/FAQ/FAQ"
import { ContextModule, OwnerType } from "@artsy/cohesion"
import * as DeprecatedAnalyticsSchema from "@artsy/cohesion/dist/DeprecatedSchema"
import { fireEvent, render, screen } from "@testing-library/react"
import { FAQ } from "Apps/Sell/Routes/FAQ/FAQ"
import { useTracking } from "react-tracking"

jest.mock("react-tracking")
Expand Down
2 changes: 1 addition & 1 deletion src/Apps/Sell/Routes/IntroRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import {
THEME,
Text,
} from "@artsy/palette"
import { SellMeta } from "Apps/Consign/Routes/MarketingLanding/Components/SellMeta"
import { SUBMISSION_LAYOUT_TOP_NAV_HEIGHT } from "Apps/Conversations/components/ConversationLayout"
import { SubmissionLayout } from "Apps/Sell/Components/SubmissionLayout"
import { SubmissionStepTitle } from "Apps/Sell/Components/SubmissionStepTitle"
import { useSubmissionTracking } from "Apps/Sell/Hooks/useSubmissionTracking"
import { SellMeta } from "Apps/Sell/Routes/MarketingLanding/Components/SellMeta"
import { RouterLink } from "System/Components/RouterLink"
import { __internal__useMatchMedia } from "Utils/Hooks/useMatchMedia"
import { cropped } from "Utils/resized"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, Text, Image, Box } from "@artsy/palette"
import { TextAndImageLayout } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/TextAndImageLayout"
import { Box, Button, Image, Text } from "@artsy/palette"
import { TextAndImageLayout } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/TextAndImageLayout"
import { RouterLink } from "System/Components/RouterLink"
import { resized } from "Utils/resized"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
Spacer,
Text,
} from "@artsy/palette"
import { PreviousSubmissionQueryRenderer } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/PreviousSubmission"
import { useMarketingLandingTracking } from "Apps/Consign/Routes/MarketingLanding/Utils/marketingLandingTracking"
import { PreviousSubmissionQueryRenderer } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/PreviousSubmission"
import { useMarketingLandingTracking } from "Apps/Sell/Routes/MarketingLanding/Utils/marketingLandingTracking"
import { RouterLink } from "System/Components/RouterLink"
import { Media } from "Utils/Responsive"
import { resized } from "Utils/resized"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ const reasons = [
export const Highlights: React.FC = () => {
return (
<GridColumns gridColumnGap={[0, 2, 4]} alignItems="fex-start">
{reasons.map(i => (
<RowItem icon={i.icon} title={i.title} text={i.text} />
{reasons.map((reason, index) => (
<RowItem
icon={reason.icon}
title={reason.title}
text={reason.text}
key={index}
/>
))}
</GridColumns>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { ContextModule, OwnerType } from "@artsy/cohesion"
import { Box, Flex, Skeleton, SkeletonBox, Text } from "@artsy/palette"
import { PreviouslySoldOnArtsyRail_recentlySoldArtworks$data } from "__generated__/PreviouslySoldOnArtsyRail_recentlySoldArtworks.graphql"
import { PreviouslySoldOnArtsyRailQuery } from "__generated__/PreviouslySoldOnArtsyRailQuery.graphql"
import { SoldArtworkFragmentContainer } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/SoldArtwork"
import { Rail } from "Components/Rail/Rail"
import { shuffle } from "lodash"
import { createFragmentContainer, graphql } from "react-relay"
import { Rail } from "Components/Rail/Rail"
import { useTracking } from "react-tracking"
import { SystemQueryRenderer } from "System/Relay/SystemQueryRenderer"
import { trackHelpers } from "Utils/cohesionHelpers"
import { extractNodes } from "Utils/extractNodes"
import { PreviouslySoldOnArtsyRailQuery } from "__generated__/PreviouslySoldOnArtsyRailQuery.graphql"
import { PreviouslySoldOnArtsyRail_recentlySoldArtworks$data } from "__generated__/PreviouslySoldOnArtsyRail_recentlySoldArtworks.graphql"
import { SoldArtworkFragmentContainer } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/SoldArtwork"

interface PreviouslySoldOnArtsyRailProps {
recentlySoldArtworks: PreviouslySoldOnArtsyRail_recentlySoldArtworks$data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Text, Box, Flex, Avatar } from "@artsy/palette"
import { Avatar, Box, Flex, Text } from "@artsy/palette"
import { HeroCarousel } from "Components/HeroCarousel/HeroCarousel"
import React from "react"

Expand Down Expand Up @@ -37,8 +37,8 @@ export const Reviews: React.FC = () => {
return (
<Box py={[0, 6, 12]}>
<HeroCarousel progressbarVariant="dot" fullBleed={false}>
{REVIEWS.map(i => {
return <ListItem review={i} />
{REVIEWS.map((review, index) => {
return <ListItem review={review} key={index} />
})}
</HeroCarousel>
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Button, Text } from "@artsy/palette"
import { useMarketingLandingTracking } from "Apps/Consign/Routes/MarketingLanding/Utils/marketingLandingTracking"
import { useMarketingLandingTracking } from "Apps/Sell/Routes/MarketingLanding/Utils/marketingLandingTracking"
import { RouterLink } from "System/Components/RouterLink"

export const SWAFooter: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ContextModule } from "@artsy/cohesion"
import { Box, Button, Text, useTheme } from "@artsy/palette"
import { Z } from "Apps/Components/constants"
import { useMarketingLandingTracking } from "Apps/Consign/Routes/MarketingLanding/Utils/marketingLandingTracking"
import { useMarketingLandingTracking } from "Apps/Sell/Routes/MarketingLanding/Utils/marketingLandingTracking"
import { RouterLink } from "System/Components/RouterLink"

export const SWAStickyFooter = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AuthContextModule } from "@artsy/cohesion"
import { Box, Image } from "@artsy/palette"
import { SoldArtwork_artwork$data } from "__generated__/SoldArtwork_artwork.graphql"
import { SoldArtworkDetailsFragmentContainer } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/SoldArtworkDetails"
import * as React from "react"
import { createFragmentContainer, graphql } from "react-relay"
import { RouterLink, RouterLinkProps } from "System/Components/RouterLink"
import { SoldArtwork_artwork$data } from "__generated__/SoldArtwork_artwork.graphql"
import { AuthContextModule } from "@artsy/cohesion"
import { Box, Image } from "@artsy/palette"
import { resized } from "Utils/resized"
import { SoldArtworkDetailsFragmentContainer } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/SoldArtworkDetails"

export interface SoldArtworkProps
extends Omit<RouterLinkProps, "to" | "width"> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ActionType, ContextModule } from "@artsy/cohesion"
import { Box, Button, Image, Text } from "@artsy/palette"
import { TextAndImageLayout } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/TextAndImageLayout"
import { useAnalyticsContext } from "System/Hooks/useAnalyticsContext"
import { TextAndImageLayout } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/TextAndImageLayout"
import { RouterLink } from "System/Components/RouterLink"
import { useAnalyticsContext } from "System/Hooks/useAnalyticsContext"
import { useSystemContext } from "System/Hooks/useSystemContext"
import { resized } from "Utils/resized"
import { useTracking } from "react-tracking"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as DeprecatedAnalyticsSchema from "@artsy/cohesion/dist/DeprecatedSchema"
import { FAQ } from "Apps/Consign/Routes/SubmissionFlow/FAQ/FAQ"
import { ContextModule, OwnerType } from "@artsy/cohesion"
import * as DeprecatedAnalyticsSchema from "@artsy/cohesion/dist/DeprecatedSchema"
import { fireEvent, render, screen } from "@testing-library/react"
import { FAQ } from "Apps/Sell/Routes/FAQ/FAQ"
import { useTracking } from "react-tracking"

jest.mock("react-tracking")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from "@testing-library/react"
import { FAQSWA } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/FAQSWA"
import { useSystemContext } from "System/Hooks/useSystemContext"
import { FAQSWA } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/FAQSWA"

jest.mock("react-tracking")
jest.mock("System/Hooks/useSystemContext")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireEvent, render, screen } from "@testing-library/react"
import { HeaderSWA } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/HeaderSWA"
import { HeaderSWA } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/HeaderSWA"
import { useFeatureFlag } from "System/Hooks/useFeatureFlag"
import { useTracking } from "react-tracking"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireEvent, render, screen } from "@testing-library/react"
import { HowItWorksSteps } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/HowItWorksSteps"
import { HowItWorksSteps } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/HowItWorksSteps"
import { useTracking } from "react-tracking"
import { useSystemContext } from "System/Hooks/useSystemContext"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { fireEvent, screen } from "@testing-library/react"
import { useTracking } from "react-tracking"
import { useSystemContext } from "System/Hooks/useSystemContext"
import { MeetTheSpecialistsFragmentContainer } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/MeetTheSpecialists"
import { MeetTheSpecialistsFragmentContainer } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/MeetTheSpecialists"
import { setupTestWrapperTL } from "DevTools/setupTestWrapper"
import { graphql } from "react-relay"
import { useTracking } from "react-tracking"
import { useSystemContext } from "System/Hooks/useSystemContext"

jest.unmock("react-relay")
jest.mock("react-tracking")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { graphql } from "react-relay"
import { setupTestWrapperTL } from "DevTools/setupTestWrapper"
import { fireEvent, screen } from "@testing-library/react"
import { PreviouslySoldOnArtsyRailFragmentContainer } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/PreviouslySoldOnArtsyRail"
import { setupTestWrapperTL } from "DevTools/setupTestWrapper"
import { graphql } from "react-relay"
import { useTracking } from "react-tracking"
import { useSystemContext } from "System/Hooks/useSystemContext"
import { PreviouslySoldOnArtsyRailFragmentContainer } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/PreviouslySoldOnArtsyRail"

jest.unmock("react-relay")
jest.mock("react-tracking")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireEvent, render, screen } from "@testing-library/react"
import { SWAFooter } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/SWAFooter"
import { SWAFooter } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/SWAFooter"
import { useTracking } from "react-tracking"

jest.mock("react-tracking")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fireEvent, render, screen } from "@testing-library/react"
import { SpeakToTheTeam } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/SpeakToTheTeam"
import { useTracking } from "react-tracking"
import { useSystemContext } from "System/Hooks/useSystemContext"
import { SpeakToTheTeam } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/SpeakToTheTeam"

jest.mock("react-tracking")
jest.mock("System/Hooks/useSystemContext")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Box, Flex, Join, Spacer } from "@artsy/palette"
import { CollectorsOverview } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/CollectorsOverview"
import { FAQSWA } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/FAQSWA"
import { FooterBanner } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/FooterBanner"
import { HeaderSWA } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/HeaderSWA"
import { Highlights } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/Highlights"
import { HowItWorksSteps } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/HowItWorksSteps"
import { MeetTheSpecialistsQueryRenderer } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/MeetTheSpecialists"
import { PreviouslySoldOnArtsyRailQueryRenderer } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/PreviouslySoldOnArtsyRail"
import { SWAFooter } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/SWAFooter"
import { SWAStickyFooter } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/SWAStickyFooter"
import { SpeakToTheTeam } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/SpeakToTheTeam"
import { WaysWeSell } from "Apps/Consign/Routes/MarketingLanding/Components/LandingPage/WaysWeSell"
import { SellMeta } from "Apps/Consign/Routes/MarketingLanding/Components/SellMeta"
import { CollectorsOverview } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/CollectorsOverview"
import { FAQSWA } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/FAQSWA"
import { FooterBanner } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/FooterBanner"
import { HeaderSWA } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/HeaderSWA"
import { Highlights } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/Highlights"
import { HowItWorksSteps } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/HowItWorksSteps"
import { MeetTheSpecialistsQueryRenderer } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/MeetTheSpecialists"
import { PreviouslySoldOnArtsyRailQueryRenderer } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/PreviouslySoldOnArtsyRail"
import { SWAFooter } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/SWAFooter"
import { SWAStickyFooter } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/SWAStickyFooter"
import { SpeakToTheTeam } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/SpeakToTheTeam"
import { WaysWeSell } from "Apps/Sell/Routes/MarketingLanding/Components/LandingPage/WaysWeSell"
import { SellMeta } from "Apps/Sell/Routes/MarketingLanding/Components/SellMeta"
import { Footer } from "Components/Footer/Footer"
import { useRouter } from "System/Hooks/useRouter"
import { Media } from "Utils/Responsive"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react"
import { MarketingLandingApp } from "Apps/Consign/Routes/MarketingLanding/MarketingLandingApp"
import { MarketingLandingApp } from "Apps/Sell/Routes/MarketingLanding/MarketingLandingApp"
import { HeadProvider } from "react-head"
import { useTracking } from "react-tracking"

Expand Down
2 changes: 1 addition & 1 deletion src/Apps/Sell/Routes/NewRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FullBleed } from "@artsy/palette"
import { AppContainer } from "Apps/Components/AppContainer"
import { SellMeta } from "Apps/Consign/Routes/MarketingLanding/Components/SellMeta"
import { ArtistRoute } from "Apps/Sell/Routes/ArtistRoute"
import { SellMeta } from "Apps/Sell/Routes/MarketingLanding/Components/SellMeta"
import { SellFlowContextProvider } from "Apps/Sell/SellFlowContext"
import { EnableRecaptcha } from "Utils/EnableRecaptcha"
import * as React from "react"
Expand Down
2 changes: 1 addition & 1 deletion src/Apps/Sell/Routes/SubmissionRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FullBleed } from "@artsy/palette"
import { AppContainer } from "Apps/Components/AppContainer"
import { SellMeta } from "Apps/Consign/Routes/MarketingLanding/Components/SellMeta"
import { SellMeta } from "Apps/Sell/Routes/MarketingLanding/Components/SellMeta"
import { SellFlowContextProvider } from "Apps/Sell/SellFlowContext"
import { SubmissionRoute_submission$key } from "__generated__/SubmissionRoute_submission.graphql"
import { HttpError } from "found"
Expand Down
Loading

0 comments on commit c6bcf02

Please sign in to comment.