Fix NavSignupCard on web

This commit is contained in:
Eric Bailey
2024-10-17 13:42:19 -05:00
parent c5e40d6695
commit 7c6576960b
4 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -7,10 +7,10 @@ import {sanitizeAppLanguageSetting} from '#/locale/helpers'
import {APP_LANGUAGES} from '#/locale/languages'
import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences'
import {resetPostsFeedQueries} from '#/state/queries/post-feed'
import {atoms as a, useTheme} from '#/alf'
import {atoms as a, useTheme, ViewStyleProp} from '#/alf'
import {ChevronBottom_Stroke2_Corner0_Rounded as ChevronDown} from '#/components/icons/Chevron'
export function AppLanguageDropdown() {
export function AppLanguageDropdown(_props: ViewStyleProp) {
const t = useTheme()
const queryClient = useQueryClient()
+3 -2
View File
@@ -6,11 +6,11 @@ import {sanitizeAppLanguageSetting} from '#/locale/helpers'
import {APP_LANGUAGES} from '#/locale/languages'
import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences'
import {resetPostsFeedQueries} from '#/state/queries/post-feed'
import {atoms as a, useTheme} from '#/alf'
import {atoms as a, useTheme, ViewStyleProp} from '#/alf'
import {ChevronBottom_Stroke2_Corner0_Rounded as ChevronDown} from '#/components/icons/Chevron'
import {Text} from '#/components/Typography'
export function AppLanguageDropdown() {
export function AppLanguageDropdown({style}: ViewStyleProp) {
const t = useTheme()
const queryClient = useQueryClient()
@@ -40,6 +40,7 @@ export function AppLanguageDropdown() {
// We don't have hitSlop here to increase the tap region,
// alternative is negative margins.
{height: 32, marginVertical: -((32 - 14) / 2)},
style,
]}>
<View
style={[
+2 -2
View File
@@ -64,8 +64,8 @@ let NavSignupCard = ({}: {}): React.ReactNode => {
</Button>
</View>
<View style={[a.pt_2xl, a.w_full]}>
<AppLanguageDropdown />
<View style={[a.mt_md, a.w_full, {height: 32}]}>
<AppLanguageDropdown style={{marginTop: 0}} />
</View>
</View>
)
+1 -1
View File
@@ -353,7 +353,7 @@ export function DesktopLeftNav() {
{hasSession ? (
<ProfileCard />
) : isDesktop ? (
<View style={{paddingHorizontal: 12}}>
<View style={[a.pt_xl]}>
<NavSignupCard />
</View>
) : null}