Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3114 Rev 3694
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react';
2
import { useNavigate } from 'react-router-dom'
2
import { useNavigate } from 'react-router-dom';
3
import { Box, IconButton, Typography } from '@mui/material'
3
import { Box, IconButton, Typography } from '@mui/material';
4
import { NavigateBefore } from '@mui/icons-material'
4
import NavigateBefore from '@mui/icons-material/NavigateBefore';
Línea 5... Línea 5...
5
 
5
 
6
export default function PageHeader({
-
 
7
  title = '',
-
 
8
  goBack = false,
-
 
9
  action = () => null
-
 
10
}) {
6
export default function PageHeader({ title = '', goBack = false, action = () => null }) {
Línea 11... Línea 7...
11
  const navigate = useNavigate()
7
  const navigate = useNavigate();
Línea 12... Línea 8...
12
 
8
 
13
  const navigateBefore = () => navigate(-1)
9
  const navigateBefore = () => navigate(-1);
14
 
10
 
15
  return (
11
  return (
Línea 38... Línea 34...
38
        <Typography variant='h1'>{title}</Typography>
34
        <Typography variant='h1'>{title}</Typography>
39
      </Box>
35
      </Box>
Línea 40... Línea 36...
40
 
36
 
41
      {action()}
37
      {action()}
42
    </Box>
38
    </Box>
43
  )
39
  );