Move gate call down

This commit is contained in:
Eric Bailey
2024-04-18 10:59:40 -05:00
parent df501d870c
commit b5e57c8768
+2 -5
View File
@@ -169,9 +169,6 @@ export function ProfileFeedScreenInner({
const feedSectionRef = React.useRef<SectionRef>(null) const feedSectionRef = React.useRef<SectionRef>(null)
const isScreenFocused = useIsFocused() const isScreenFocused = useIsFocused()
const gate = useGate() const gate = useGate()
const isPrimaryAlgoExperimentEnabled = gate(
'reduced_onboarding_and_home_algo',
)
const primaryAlgoDialogControl = useDialogControl() const primaryAlgoDialogControl = useDialogControl()
const primaryAlgo = preferences.primaryAlgorithm const primaryAlgo = preferences.primaryAlgorithm
@@ -329,7 +326,7 @@ export function ProfileFeedScreenInner({
<View style={[a.flex_row, a.align_center, a.gap_sm]}> <View style={[a.flex_row, a.align_center, a.gap_sm]}>
{feedInfo && hasSession && ( {feedInfo && hasSession && (
<> <>
{isPrimaryAlgoExperimentEnabled && isPrimaryAlgo ? ( {gate('reduced_onboarding_and_home_algo') && isPrimaryAlgo ? (
<NewButton <NewButton
variant="solid" variant="solid"
color="secondary" color="secondary"
@@ -476,7 +473,7 @@ export function ProfileFeedScreenInner({
onPressReport, onPressReport,
onPressShare, onPressShare,
t, t,
isPrimaryAlgoExperimentEnabled, gate,
isPrimaryAlgo, isPrimaryAlgo,
primaryAlgoDialogControl, primaryAlgoDialogControl,
onSetPrimaryAlgo, onSetPrimaryAlgo,