Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455import {useEffect} from 'react'import {StatusBar} from 'react-native'import Animated, { Easing, SlideInDown, SlideOutDown,} from 'react-native-reanimated'
import {useComposerState} from '#/state/shell/composer'import {ComposePost} from '#/view/com/composer/Composer'import {atoms as a, useTheme} from '#/alf'
export function Composer() { const state = useComposerState() const t = useTheme()
const open = !!state
useEffect(() => { if (open) { const entry = StatusBar.pushStackEntry({ barStyle: t.name !== 'light' ? 'light-content' : 'dark-content', animated: true, }) return () => StatusBar.popStackEntry(entry) } }, [open, t.name])
if (!open) { return null }
return ( <Animated.View style={[a.absolute, a.inset_0, t.atoms.bg]} entering={SlideInDown.duration(300).easing(Easing.out(Easing.exp))} exiting={SlideOutDown.duration(200).easing(Easing.in(Easing.quad))} aria-modal accessibilityViewIsModal> <ComposePost replyTo={state.replyTo} onPost={state.onPost} onPostSuccess={state.onPostSuccess} quote={state.quote} mention={state.mention} text={state.text} imageUris={state.imageUris} videoUri={state.videoUri} openGallery={state.openGallery} contextualCommunityFeedTarget={state.contextualCommunityFeedTarget} /> </Animated.View> )}