Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1749 | Rev 1751 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import React from 'react'
import { useParams } from 'react-router-dom'
import { Container, Typography } from '@mui/material'

import useFetch from '@app/hooks/useFetch'

import LoaderContainer from '@app/components/UI/LoaderContainer'
import Spinner from '@app/components/UI/Spinner'
import ReportCard from '@app/components/abuse-report/report-card'

export default function AbuseReportViewPage() {
  const { id } = useParams()
  const { data: report, isLoading } = useFetch(`/abuse-report/view/${id}`)

  return (
    <Container>
      <Typography variant='h1' mb={2}>
        Reporte {id}
      </Typography>

      {isLoading ? (
        <LoaderContainer>
          <Spinner />
        </LoaderContainer>
      ) : (
        <ReportCard report={report} />
      )}
    </Container>
  )
}