import {type FunctionComponent} from 'react'
import {useParams} from 'react-router'
import {useGetArtifact} from '@/api/artifactsApi.ts'
import ArtifactPageLayout from '@/pages/artifact/artifactPageLayout.tsx'

const ArtifactPage: FunctionComponent = () => {
  const {id} = useParams()
  const {data: artifact} = useGetArtifact(Number(id))

  return (
    <>
      <ArtifactPageLayout {...artifact} />
    </>
  )
}

export default ArtifactPage
