import React from 'react'
import { Link } from 'gatsby'

const BreadcrumbsItem = ({path, children, length, index}) => {
    return (
        <>
            {path
            ?
                <Link to={path}>{children}</Link>
            :
                <p className='text-black'>{children}</p>
            }
            {index !== length &&
                <div className=''> / </div>
            }
        </>
        
    )
}

export default BreadcrumbsItem