Skip to content

Commit

Permalink
fix: artwork quiz link back button (#11304)
Browse files Browse the repository at this point in the history
(cherry picked from commit 08160fd)
  • Loading branch information
MounirDhahri committed Dec 18, 2024
1 parent 4cd0789 commit 6b24a8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ArtQuizResultsEmptyTabsQuery } from "__generated__/ArtQuizResultsEmptyT
import { ArtQuizResultsTabsHeader } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizResultsTabsHeader"
import { ArtQuizTrendingArtists } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizTrendingArtists"
import { ArtQuizTrendingCollections } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizTrendingCollections"
import { navigate } from "app/system/navigation/navigate"
import { popToRoot } from "app/system/navigation/navigate"

import { graphql, useLazyLoadQuery } from "react-relay"

Expand All @@ -19,7 +19,7 @@ export const ArtQuizResultsEmptyTabs = () => {
title="Explore Your Quiz Results"
lazy
headerProps={{
onBack: () => navigate("/"),
onBack: () => popToRoot(),
}}
BelowTitleHeaderComponent={() => (
<Flex mb={1}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ArtQuizExploreArtists } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuiz
import { ArtQuizExploreArtworks } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizExploreArtworks"
import { ArtQuizLikedArtworks } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizLikedArtworks"
import { ArtQuizResultsTabsHeader } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResultsTabs/ArtQuizResultsTabsHeader"
import { navigate } from "app/system/navigation/navigate"
import { popToRoot } from "app/system/navigation/navigate"
import React, { useState } from "react"
import { graphql, useFragment } from "react-relay"

Expand All @@ -26,7 +26,7 @@ export const ArtQuizResultsTabs = ({ me }: { me: ArtQuizResultsQuery$data["me"]
title={title}
lazy
headerProps={{
onBack: () => navigate("/"),
onBack: () => popToRoot(),
}}
onTabChange={({ tabName }) => {
setActiveTab(tabName as TabName)
Expand Down

0 comments on commit 6b24a8a

Please sign in to comment.