Fix NavSignupCard on web (#5813)
This commit is contained in:
@@ -7,10 +7,10 @@ import {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
|||||||
import {APP_LANGUAGES} from '#/locale/languages'
|
import {APP_LANGUAGES} from '#/locale/languages'
|
||||||
import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences'
|
import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences'
|
||||||
import {resetPostsFeedQueries} from '#/state/queries/post-feed'
|
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 {ChevronBottom_Stroke2_Corner0_Rounded as ChevronDown} from '#/components/icons/Chevron'
|
||||||
|
|
||||||
export function AppLanguageDropdown() {
|
export function AppLanguageDropdown(_props: ViewStyleProp) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
|
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
|||||||
import {APP_LANGUAGES} from '#/locale/languages'
|
import {APP_LANGUAGES} from '#/locale/languages'
|
||||||
import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences'
|
import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences'
|
||||||
import {resetPostsFeedQueries} from '#/state/queries/post-feed'
|
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 {ChevronBottom_Stroke2_Corner0_Rounded as ChevronDown} from '#/components/icons/Chevron'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export function AppLanguageDropdown() {
|
export function AppLanguageDropdown({style}: ViewStyleProp) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
|
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
@@ -40,6 +40,7 @@ export function AppLanguageDropdown() {
|
|||||||
// We don't have hitSlop here to increase the tap region,
|
// We don't have hitSlop here to increase the tap region,
|
||||||
// alternative is negative margins.
|
// alternative is negative margins.
|
||||||
{height: 32, marginVertical: -((32 - 14) / 2)},
|
{height: 32, marginVertical: -((32 - 14) / 2)},
|
||||||
|
style,
|
||||||
]}>
|
]}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ let NavSignupCard = ({}: {}): React.ReactNode => {
|
|||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[a.pt_2xl, a.w_full]}>
|
<View style={[a.mt_md, a.w_full, {height: 32}]}>
|
||||||
<AppLanguageDropdown />
|
<AppLanguageDropdown style={{marginTop: 0}} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ export function DesktopLeftNav() {
|
|||||||
{hasSession ? (
|
{hasSession ? (
|
||||||
<ProfileCard />
|
<ProfileCard />
|
||||||
) : isDesktop ? (
|
) : isDesktop ? (
|
||||||
<View style={{paddingHorizontal: 12}}>
|
<View style={[a.pt_xl]}>
|
||||||
<NavSignupCard />
|
<NavSignupCard />
|
||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user