-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix(replay): Remove browser from table if all mobile replays #74796
Conversation
Bundle ReportChanges will decrease total bundle size by 7.25kB ⬇️
|
@@ -80,7 +88,7 @@ function GroupReplays({group}: Props) { | |||
isFetching={isFetching} | |||
replays={[]} | |||
sort={undefined} | |||
visibleColumns={VISIBLE_COLUMNS} | |||
visibleColumns={allMobileProj ? VISIBLE_COLUMNS_MOBILE : VISIBLE_COLUMNS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ternary seems to be used a lot throughout this file, can we make it a constant up top?
@@ -52,6 +62,7 @@ function GroupReplays({group}: Props) { | |||
location, | |||
organization, | |||
}); | |||
const {allMobileProj} = useAllMobileProj(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oo sorry, i meant, can we move the visibleColumns
definition to under here? that way we don't need a function (we don't need to pass in allMobileProj
then, can just case directly on allMobileProj
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, what do you think is better🤔 because i see with that method we'd have to define the const twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's three functional components using VISIBLE_COLUMNS
in this file so I don't think we can do it better without a function :(
Fixes #74747