Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1370 | Rev 1373 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1370 Rev 1372
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { NavLink as Link } from 'react-router-dom'
2
import { NavLink as Link } from 'react-router-dom'
3
import { Typography, Container, styled, Chip, Breadcrumbs } from '@mui/material'
3
import { Typography, Container, styled, Breadcrumbs } from '@mui/material'
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea 5...
5
import useFetch from '../../hooks/useFetch'
5
import useFetch from '../../hooks/useFetch'
Línea 6... Línea 6...
6
 
6
 
7
import styles from './PoliciesLayout.module.scss'
-
 
8
 
7
import styles from './PoliciesLayout.module.scss'
9
const StyledBreadcrumb = styled(Chip)(({ theme }) => {
8
 
10
  return {
-
 
11
    '&:active': {
9
const StyledBreadcrumbs = styled(Breadcrumbs)`
12
      display: 'none'
10
  li a.active {
Línea 13... Línea 11...
13
    }
11
    display: none;
14
  }
12
  }
15
})
13
`
16
 
14
 
Línea 29... Línea 27...
29
  const { data, isLoading } = useFetch('/helpers/footer')
27
  const { data, isLoading } = useFetch('/helpers/footer')
Línea 30... Línea 28...
30
 
28
 
Línea 31... Línea 29...
31
  if (isLoading) return null
29
  if (isLoading) return null
32
 
30
 
33
  return (
31
  return (
Línea 34... Línea 32...
34
    <Breadcrumbs aria-label='breadcrumb'>
32
    <StyledBreadcrumbs sx={{ mb: 2 }} aria-label='breadcrumb'>
35
      <StyledBreadcrumb to='/' component={Link} label='Inicio' />
-
 
36
 
33
      <Link to='/'>Inicio</Link>
37
      {Object.entries(data).map(([href, label]) => (
-
 
38
        <StyledBreadcrumb
-
 
39
          key={`${href}-${label}`}
34
 
40
          to={href}
35
      {Object.entries(data).map(([href, label]) => (
41
          component={Link}
36
        <Link key={`${href}-${label}`} to={href}>
42
          label={label}
37
          {label}
43
        />
38
        </Link>
44
      ))}
39
      ))}
Línea 45... Línea 40...
45
    </Breadcrumbs>
40
    </StyledBreadcrumbs>