The SuburbanStationSwitch
component is a sophisticated React Native component designed to display a visual timeline of a multi-leg journey involving train transfers and walking segments. It provides users with a clear, step-by-step visualization of their station switching plan, complete with real-time status tracking and animated progress indicators.
๐
A React Native bottom sheet modal component that displays bus information and switching options in two different states:
- When specific bus information is available
- When showing a list of alternative buses
- Bottom sheet modal with a custom handle component
- Dynamic countdown timer for bus arrival
This file contains hidden or 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 { useCallback, useMemo } from 'react'; | |
import { | |
useAnimatedStyle, | |
useSharedValue, | |
withSpring, | |
WithSpringConfig, | |
withTiming, | |
WithTimingConfig, | |
} from 'react-native-reanimated'; |
This documentation covers a set of React Native components that work together to create a sophisticated ticket display interface for public transportation (Metro and Bus services). The system consists of three main components:
- TransitInfoCard - Main ticket information display
- TicketSplit - Passenger count breakdown
- TicketHeader - Ticket metadata display
This file contains hidden or 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 React, { useEffect, useMemo, useState } from 'react'; | |
import { Pressable, View } from 'react-native'; | |
import { PlayBackType } from 'react-native-audio-recorder-player'; | |
import Animated, { FadeIn, FadeOut, useSharedValue } from 'react-native-reanimated'; | |
import { Slider } from '~/components/Slider'; | |
import { Spinner } from '~/components/Spinner'; | |
import { useAudioPlayer } from '~/store/useAudioPlayer'; | |
import { PauseIcon, PlayIcon } from '~/svg'; | |
import { tailwind } from '~/theme/tailwind'; |
This file contains hidden or 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 React from 'react'; | |
import { LayoutChangeEvent, StyleSheet } from 'react-native'; | |
import { Gesture, GestureDetector } from 'react-native-gesture-handler'; | |
import Animated, { | |
clamp, | |
Extrapolate, | |
interpolate, | |
runOnJS, | |
SharedValue, | |
useAnimatedReaction, |
This file contains hidden or 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 React, { useCallback } from "react"; | |
import { | |
NativeSyntheticEvent, | |
Platform, | |
Pressable, | |
TextInputContentSizeChangeEventData, | |
TextInputProps, | |
} from "react-native"; | |
import Animated, { | |
Layout, |
This file contains hidden or 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
const AudioPlayer = (props: AudioPlayerProps) => { | |
const { audioSrc } = props; | |
const [isPlaying, setIsPlaying] = useState(false); | |
const [isSoundLoading, setSoundLoadStatus] = useState(true); | |
const { position, duration } = useProgress(); | |
const currentPosition = useDerivedValue(() => Math.round(position)); | |
const totalDuration = useDerivedValue(() => Math.round(duration)); |
This file contains hidden or 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 { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"; | |
import { | |
Alert, | |
Dimensions, | |
Pressable, | |
StatusBar, | |
StyleSheet, | |
Text, | |
TextInput, | |
View, |
By ISO2Code
https://country-flags-topaz.vercel.app/api/getCountryFlagByISO2Code?iso2code=AU
<img src="https://country-flags-topaz.vercel.app/api/getCountryFlagByISO2Code?iso2code=AU" height="150">
NewerOlder