Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4790 Rev 4903
Línea 40... Línea 40...
40
const Item = ({ Icon, title, url, childs = [] }) => {
40
const Item = ({ Icon, title, url, childs = [] }) => {
41
    return (
41
    return (
42
        <ListItem disablePadding>
42
        <ListItem disablePadding>
43
            {!childs.length
43
            {!childs.length
44
                ?
44
                ?
45
                <Link href={url} display='flex' gap='.5rem'>
45
                <Link href={`/${url}`} display='flex' gap='.5rem'>
46
                    <ListItemIcon>
46
                    <ListItemIcon>
47
                        {Icon && <Icon />}
47
                        {Icon && <Icon />}
48
                    </ListItemIcon>
48
                    </ListItemIcon>
49
                    <ListItemText primary={title} />
49
                    <ListItemText primary={title} />
50
                </Link>
50
                </Link>
Línea 62... Línea 62...
62
                            if (child.childs?.length) {
62
                            if (child.childs?.length) {
63
                                return (
63
                                return (
64
                                    <Accordion key={index} sx={{ border: 'none', width: '100%', boxShadow: 'none' }}>
64
                                    <Accordion key={index} sx={{ border: 'none', width: '100%', boxShadow: 'none' }}>
65
                                        <AccordionSummary
65
                                        <AccordionSummary
66
                                            expandIcon={<ExpandMoreIcon />}
66
                                            expandIcon={<ExpandMoreIcon />}
67
                                            sx={{ minHeight: 'auto !important', margin: '0'}}
67
                                            sx={{ minHeight: 'auto !important', margin: '0' }}
68
                                        >
68
                                        >
69
                                            <Typography margin='0'>{child.label}</Typography>
69
                                            <Typography margin='0'>{child.label}</Typography>
70
                                        </AccordionSummary>
70
                                        </AccordionSummary>
71
                                        <AccordionDetails sx={{ padding: 0 }}>
71
                                        <AccordionDetails sx={{ padding: 0 }}>
72
                                            {child.childs.map((levelThree, index) => {
72
                                            {child.childs.map((levelThree, index) => {
73
                                                return (
73
                                                return (
74
                                                    <Link key={index} href={levelThree.href}>
74
                                                    <Link key={index} href={`/${levelThree.href}`}>
75
                                                        <ListItemText primary={levelThree.label} />
75
                                                        <ListItemText primary={levelThree.label} />
76
                                                    </Link>
76
                                                    </Link>
77
                                                )
77
                                                )
78
                                            })}
78
                                            })}
79
                                        </AccordionDetails>
79
                                        </AccordionDetails>
80
                                    </Accordion>
80
                                    </Accordion>
81
                                )
81
                                )
82
                            }
82
                            }
83
                            return (
83
                            return (
84
                                <Link key={index} href={child.href}>
84
                                <Link key={index} href={`${child.href}`}>
85
                                    <ListItemText primary={child.label} />
85
                                    <ListItemText primary={child.label} />
86
                                </Link>
86
                                </Link>
87
                            )
87
                            )
88
                        })}
88
                        })}
89
                    </AccordionDetails>
89
                    </AccordionDetails>