export const useFlatten = arr => {
  const flatten = arr.map(
    ({
      node: {
        parent: { relativeDirectory },
        ...rest
      },
    }) => ({
      relativeDirectory,
      ...rest,
    })
  )
  return flatten
}
