This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { ConfigPlugin } from '@expo/config-plugins'; | |
import { withXcodeProject } from '@expo/config-plugins'; | |
/* | |
https://github.com/CocoaPods/CocoaPods/issues/12022 | |
https://developer.apple.com/forums/thread/733461 | |
in xCode 15, the signature files seems to be generated twice, which causes the build to fail. | |
*/ | |
const withMyCustomBuildPhase: ConfigPlugin = (config) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PropsType = { | |
forecast: ForecastType, | |
index: number | |
}; | |
export class ForecastItem extends Component<PropsType, StateType> { | |
render() { | |
const { forecast, index } = this.props; | |
const image = getImageFromWeatherType(forecast.weatherType); | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PropsType = { index?: number }; | |
export class TransitionView extends PureComponent<PropsType> { | |
render() { | |
const { index, ...rest } = this.props; | |
return ( | |
<Animatable.View | |
animation="fadeIn" | |
duration={theme.transitionDuration} | |
delay={index ? (index * theme.transitionDuration) / 5 : 0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ForecastItem extends Component<PropsType, StateType> { | |
render() { | |
const { forecast } = this.props; | |
const image = getImageFromWeatherType(forecast.weatherType); | |
return ( | |
<TransitionView style={styles.container}> | |
// ... | |
</TransitionView> | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
//... | |
return ( | |
<TransitionView style={styles.container} animation="slideInDown"> | |
{!!maxTemperature && !!minTemperature && !!weatherType && !!image && ( | |
//... | |
} | |
</TransitionView> | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
const { maxTemperature, minTemperature, weatherType } = this.props; | |
const today = new Date(); | |
const image = getImageFromWeatherType(weatherType); | |
return ( | |
<View style={styles.container}> | |
{!!maxTemperature && !!minTemperature && !!weatherType && !!image && ( | |
<TransitionView style={styles.content}> | |
<View> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
return ( | |
<View style={styles.container}> | |
<View style={styles.content}> | |
<View> | |
<Text style={[theme.typo.mediumText, styles.whiteText]}> | |
{today.toDateString()} | |
</Text> | |
<Text style={[theme.typo.veryBigText, styles.whiteText]}> | |
{maxTemperature ? `${maxTemperature}°` : ""} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
render() { | |
const { ...rest } = this.props; | |
return ( | |
<Animatable.View | |
animation="fadeIn" | |
duration={theme.transitionDuration} | |
useNativeDriver | |
{...rest} | |
/> |