import React from 'react'
import { Ionicons } from '@expo/vector-icons'
import { useNavigation } from '@react-navigation/native'
import { GoBackContainer } from './styles'
import { theme } from '~/styles/theme'

export const GoBack = () => {
  const navigation = useNavigation()
  return (
    <GoBackContainer onPress={() => navigation.goBack()}>
      <Ionicons name="chevron-back" color="white" size={theme.metrics.px(28)} />
    </GoBackContainer>
  )
}
