fix: Simpler goBack
This commit is contained in:
parent
137f5272e3
commit
17b33de4d7
@ -39,10 +39,6 @@ export function MediaPage({ navigation, route }: Props): React.ReactElement {
|
|||||||
const isVideoPaused = !isForeground || !isScreenFocused;
|
const isVideoPaused = !isForeground || !isScreenFocused;
|
||||||
const [savingState, setSavingState] = useState<'none' | 'saving' | 'saved'>('none');
|
const [savingState, setSavingState] = useState<'none' | 'saving' | 'saved'>('none');
|
||||||
|
|
||||||
const onClosePressed = useCallback(() => {
|
|
||||||
navigation.goBack();
|
|
||||||
}, [navigation]);
|
|
||||||
|
|
||||||
const onMediaLoad = useCallback((event: OnLoadData | NativeSyntheticEvent<ImageLoadEventData>) => {
|
const onMediaLoad = useCallback((event: OnLoadData | NativeSyntheticEvent<ImageLoadEventData>) => {
|
||||||
if (isVideoOnLoadEvent(event)) {
|
if (isVideoOnLoadEvent(event)) {
|
||||||
console.log(
|
console.log(
|
||||||
@ -110,7 +106,7 @@ export function MediaPage({ navigation, route }: Props): React.ReactElement {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<PressableOpacity style={styles.closeButton} onPress={onClosePressed}>
|
<PressableOpacity style={styles.closeButton} onPress={navigation.goBack}>
|
||||||
<IonIcon name="close" size={35} color="white" style={styles.icon} />
|
<IonIcon name="close" size={35} color="white" style={styles.icon} />
|
||||||
</PressableOpacity>
|
</PressableOpacity>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user