Skip to content

Commit

Permalink
replace static username
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzaizzat committed May 3, 2024
1 parent 3d693f2 commit 2bc1fb0
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ export function GalleryEditorRenderer({ queryRef }: Props) {
graphql`
fragment GalleryEditorRendererQueryFragment on Query {
...GalleryEditorSectionFragment
viewer {
... on Viewer {
user {
username
}
}
}
}
`,
queryRef
Expand All @@ -41,6 +48,8 @@ export function GalleryEditorRenderer({ queryRef }: Props) {
const navigation = useNavigation<RootStackNavigatorProp>();
const route = useRoute<RouteProp<RootStackNavigatorParamList, 'GalleryEditor'>>();

const username = query.viewer?.user?.username;

useEffect(() => {
if (route.params.isNewGallery) {
// reset the navigation stack to remove the nft selector screen
Expand All @@ -57,7 +66,7 @@ export function GalleryEditorRenderer({ queryRef }: Props) {
params: {
screen: 'Profile',
params: {
username: 'fraser',
username,
navigateToTab: 'Galleries',
},
},
Expand Down Expand Up @@ -96,6 +105,7 @@ export function GalleryEditorRenderer({ queryRef }: Props) {
toggleTokensStaged,
route.params.galleryId,
route.params.isNewGallery,
username,
]);

const items = useMemo((): ListItemType[] => {
Expand Down

0 comments on commit 2bc1fb0

Please sign in to comment.