1
0
mirror of https://github.com/tooot-app/app synced 2025-01-10 00:26:57 +01:00

Fix babel

This commit is contained in:
xmflsct 2022-12-24 14:46:39 +01:00
parent f3b46b7e9c
commit 21d6baa70d
2 changed files with 23 additions and 24 deletions

View File

@ -1,30 +1,29 @@
module.exports = function (api) { module.exports = function (api) {
api.cache(false) api.cache(false)
const plugins = [
'@babel/plugin-proposal-optional-chaining',
[
'module-resolver',
{
root: ['./'],
alias: {
'@assets': './assets',
'@root': './src',
'@api': './src/api',
'@helpers': './src/helpers',
'@components': './src/components',
'@screens': './src/screens',
'@utils': './src/utils'
}
}
],
'react-native-reanimated/plugin'
]
if (process.env.NODE_ENV === 'production' || process.env.BABEL_ENV === 'production') { if (process.env.NODE_ENV === 'production' || process.env.BABEL_ENV === 'production') {
plugins.push('transform-remove-console') plugins.push('transform-remove-console')
} }
return { return { presets: ['babel-preset-expo'], plugins }
presets: ['babel-preset-expo'],
plugins: [
'@babel/plugin-proposal-optional-chaining',
[
'module-resolver',
{
root: ['./'],
alias: {
'@assets': './assets',
'@root': './src',
'@api': './src/api',
'@helpers': './src/helpers',
'@components': './src/components',
'@screens': './src/screens',
'@utils': './src/utils'
}
}
],
'react-native-reanimated/plugin'
]
}
} }

View File

@ -258,7 +258,7 @@ const ScreenCompose: React.FC<RootStackScreenProps<'Screen-Compose'>> = ({
<HeaderRight <HeaderRight
type='text' type='text'
content={t( content={t(
`heading.right.button.${ `screenCompose:heading.right.button.${
(params?.type && (params?.type &&
(params.type === 'conversation' (params.type === 'conversation'
? params.visibility === 'direct' ? params.visibility === 'direct'
@ -266,7 +266,7 @@ const ScreenCompose: React.FC<RootStackScreenProps<'Screen-Compose'>> = ({
: 'default' : 'default'
: params.type)) || : params.type)) ||
'default' 'default'
}` as any }`
)} )}
onPress={() => { onPress={() => {
composeDispatch({ type: 'posting', payload: true }) composeDispatch({ type: 'posting', payload: true })