All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pages.DetailPage.js Maven / Gradle / Ivy

There is a newer version: 0.80.3
Show newest version
import { Helmet }            from 'react-helmet';
import DetailView            from 'components/view/DetailView';
import { useTranslation }    from 'react-i18next';
import { handleResult }      from 'utils/utils';
import { Box, }              from '@mui/material';
import { useQuery }          from '@apollo/client';
import { useParams }         from 'react-router';
import NotFound              from 'pages/NotFound';
import { useNotifier }       from 'hooks/notification';
import { useConfig }         from 'hooks/config';
import { GET_DETAIL_VIEW }   from 'queries/detail';
import ViewLayout            from 'components/view/ViewLayout';
import { getEnabledLinks }   from 'components/view/utils/links';
import DetailBreadcrumbs     from 'components/breadcrumbs/DetailBreadcrumbs';
import RenderContextProvider from 'contexts/RenderContext';
import { useTranslator }     from 'hooks/translator';
import StickyBannerLayout    from 'components/layout/common/StickyBannerLayout';

const DetailPage = () => {
  const {t}         = useTranslation()
  const { project } = useConfig()
  const { id: detailId, detail: detailKey } = useParams()
  console.log("detailId=%o, detailKey=%o", detailId, detailKey)

  return (
    <>
      
        {t('detail')} | {project}
      
      
        
      
    
  )
}

const DetailResult = ({ detailKey, detailId }) => {
  const result   = useQuery(GET_DETAIL_VIEW, { variables: { detailKey, detailId } })
  const notifier = useNotifier()

  return handleResult(result, notifier,
    data  => (
      
    ),
    error => {
      console.error("GraphQL error: %o", error); return 
    }
  )
}

const DetailContents = ({ schema, sections, links }) => {
  const {translator} = useTranslator()
  const label = translator.toDetailTitle(schema.key, schema.label)

  return (
    
       }
      >
        
          
        
      
    
  )
}

export default DetailPage




© 2015 - 2024 Weber Informatics LLC | Privacy Policy