
import useRoute from '@/routes/hooks/useRoute';

const titleStyle = {
  margin: 0,
}

const spanStyle = {
  display: 'inline-block',
  width: '24px',
  textAlign: 'center'
}

export default (props) => {
  const route = useRoute();
  const { title } = route && route.meta || {}

  return (
    <h5 style={titleStyle}>
      { title && <span style={spanStyle}>&raquo;</span> }
      { title && <span>{title}</span> }
    </h5>
  );
}
