mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Restyle login
This commit is contained in:
@ -8,18 +8,17 @@ type PropsBase = {
|
||||
onPress: () => void
|
||||
disabled?: boolean
|
||||
buttonSize?: 'S' | 'M'
|
||||
size?: 'S' | 'M' | 'L'
|
||||
}
|
||||
|
||||
export interface PropsText extends PropsBase {
|
||||
text: string
|
||||
icon?: any
|
||||
size?: 'S' | 'M' | 'L'
|
||||
}
|
||||
|
||||
export interface PropsIcon extends PropsBase {
|
||||
text?: string
|
||||
icon: any
|
||||
size?: 'S' | 'M' | 'L'
|
||||
}
|
||||
|
||||
const ButtonRow: React.FC<PropsText | PropsIcon> = ({
|
||||
@ -71,16 +70,13 @@ const styles = StyleSheet.create({
|
||||
button: {
|
||||
paddingLeft: StyleConstants.Spacing.M,
|
||||
paddingRight: StyleConstants.Spacing.M,
|
||||
borderWidth: 1,
|
||||
borderRadius: 100
|
||||
borderWidth: 1.25,
|
||||
borderRadius: 100,
|
||||
alignItems: 'center'
|
||||
},
|
||||
text: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
})
|
||||
|
||||
export default React.memo(ButtonRow, (prev, next) => {
|
||||
let skipUpdate = true
|
||||
skipUpdate = prev.disabled === next.disabled
|
||||
return skipUpdate
|
||||
})
|
||||
export default ButtonRow
|
||||
|
@ -1,8 +0,0 @@
|
||||
import React from 'react'
|
||||
import { Text } from 'react-native'
|
||||
|
||||
const PleaseLogin = () => {
|
||||
return <Text>请先登录</Text>
|
||||
}
|
||||
|
||||
export default PleaseLogin
|
@ -15,7 +15,6 @@ import {
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import getCurrentTab from '@utils/getCurrentTab'
|
||||
import PleaseLogin from '@components/PleaseLogin'
|
||||
|
||||
const Stack = createNativeStackNavigator()
|
||||
|
||||
@ -30,9 +29,7 @@ const Page = ({
|
||||
<View style={{ width: Dimensions.get('window').width }}>
|
||||
{localRegistered || page === 'RemotePublic' ? (
|
||||
<Timeline page={page} />
|
||||
) : (
|
||||
<PleaseLogin />
|
||||
)}
|
||||
) : null}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user