Merge branch 'main' into ansh/app-812-add-custom-feed-discovery-to-onboarding

zio/stable
Ansh Nanda 2023-08-25 14:53:03 -07:00
commit 0ca28ccca6
8 changed files with 17 additions and 11 deletions

View File

@ -9,6 +9,7 @@ module.exports = {
plugins: ['@typescript-eslint', 'detox'],
ignorePatterns: [
'**/__mocks__/*.ts',
'src/platform/polyfills.ts',
'src/third-party',
'ios',
'android',
@ -25,6 +26,7 @@ module.exports = {
files: ['*.js', '*.mjs', '*.ts', '*.tsx'],
rules: {
semi: [2, 'never'],
'react-native/no-inline-styles': 0,
},
},
],

View File

@ -316,9 +316,9 @@ function CustomHandleForm({
// events
// =
const onPressCopy = React.useCallback(() => {
Clipboard.setString(`did=${store.me.did}`)
Clipboard.setString(isDNSForm ? `did=${store.me.did}` : store.me.did)
Toast.show('Copied to clipboard')
}, [store.me.did])
}, [store.me.did, isDNSForm])
const onChangeHandle = React.useCallback(
(v: string) => {
setHandle(v)
@ -410,11 +410,11 @@ function CustomHandleForm({
{isDNSForm ? (
<>
<Text type="md" style={[pal.text, s.pb5, s.pl5]}>
Add the following record to your domain:
Add the following DNS record to your domain:
</Text>
<View style={[styles.dnsTable, pal.btn]}>
<Text type="md-medium" style={[styles.dnsLabel, pal.text]}>
Domain:
Host:
</Text>
<View style={[styles.dnsValue]}>
<Text type="mono" style={[styles.monoText, pal.text]}>

View File

@ -118,10 +118,10 @@ function Modal({modal}: {modal: ModalIface}) {
}
return (
// eslint-disable-next-line
// eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors
<TouchableWithoutFeedback onPress={onPressMask}>
<View style={styles.mask}>
{/* eslint-disable-next-line */}
{/* eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors */}
<TouchableWithoutFeedback onPress={onInnerPress}>
<View
style={[

View File

@ -21,7 +21,7 @@ export const Component = observer(({did}: {did: string}) => {
const {screen} = useAnalytics()
// track the navigator state to detect if a page-load occurred
const navState = useNavigationState(s => s)
const navState = useNavigationState(state => state)
const [initNavState] = useState(navState)
const isLoading = initNavState !== navState

View File

@ -3,10 +3,12 @@ import {AlertButton, AlertStatic} from 'react-native'
class WebAlert implements Pick<AlertStatic, 'alert'> {
public alert(title: string, message?: string, buttons?: AlertButton[]): void {
if (buttons === undefined || buttons.length === 0) {
// eslint-disable-next-line no-alert
window.alert([title, message].filter(Boolean).join('\n'))
return
}
// eslint-disable-next-line no-alert
const result = window.confirm([title, message].filter(Boolean).join('\n'))
if (result === true) {

View File

@ -174,8 +174,8 @@ export function Selector({
<View
style={[pal.view, styles.outer]}
onLayout={e => {
const {height} = e.nativeEvent.layout
setHeight(height || 60)
const {height: layoutHeight} = e.nativeEvent.layout
setHeight(layoutHeight || 60)
}}>
{items.map((item, i) => {
const selected = i === selectedIndex

View File

@ -92,7 +92,9 @@ export const ProfileScreen = withAuthRequired(
const onPressCompose = React.useCallback(() => {
track('ProfileScreen:PressCompose')
store.shell.openComposer({mention: uiState.profile.handle})
const mention =
uiState.profile.handle === store.me.handle ? '' : uiState.profile.handle
store.shell.openComposer({mention})
}, [store, track, uiState])
const onSelectView = React.useCallback(
(index: number) => {

View File

@ -59,9 +59,9 @@ const styles = StyleSheet.create({
height: '100%',
backgroundColor: '#000c',
alignItems: 'center',
justifyContent: 'center',
},
container: {
marginTop: 50,
maxWidth: 600,
width: '100%',
paddingVertical: 0,