Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Add game title to QuestDetailsWrapper component #52

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

biliesilva
Copy link
Contributor

Description

Added the game listings directly to the badge in the component, next step is to update the client for this lib.

Storybook

image

Design Link

Copy link

vercel bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quests-ui ✅ Ready (Inspect) Visit Preview Feb 13, 2025 3:10pm

Copy link

@jiyuu-jin jiyuu-jin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! 🔥

@BrettCleary
Copy link
Contributor

got some conflicts to resolve on this one @biliesilva

@@ -152,8 +158,8 @@ export function QuestDetailsWrapper(props: QuestDetailsWrapperProps) {
'Connect Steam account'
),
questType: {
REPUTATION: t('quest.type.reputation', 'Reputation'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to keep the reputation translation string

REPUTATION: t('quest.type.reputation', 'Reputation'),
PLAYSTREAK: t('quest.type.playstreak', 'Play Streak')
PLAYSTREAK: t('quest.type.playstreak', 'Play Streak'),
GAME: gameName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

game isn't a quest type. did you mean to add this prop somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are two different badges, one is the type of quest, and the other is the game name.

@@ -68,6 +72,8 @@ export function QuestDetailsWrapper(props: QuestDetailsWrapperProps) {

const questResult = useGetQuest(selectedQuestId, getQuest)
const questMeta = questResult.data?.data
const projectId = questMeta?.project_id
const gameName = projectId && listings?.[projectId]?.project_meta?.name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we just pass in listings?.[projectId]?.project_meta?.name as game name as a prop to this component instead of passing the whole listings object?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a lot of data to pass around if we have to pass the listings object here too. This will probably be hard to adopt in store and client since they can use different listings interfaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this was something I was talking with @eliobricenov about, I will ping your conversations about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants