Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1850 Rev 1851
Línea 1... Línea 1...
1
import React, { useState, useEffect } from 'react'
1
import React, { useEffect, useState } from 'react'
2
import { useDispatch, useSelector } from 'react-redux'
2
import { useDispatch, useSelector } from 'react-redux'
3
import ProfileWidget from '../ProfileWidget'
-
 
4
import LanguagesModal from './LanguagesModal'
-
 
5
import { IconButton } from '@mui/material'
3
import { IconButton } from '@mui/material'
6
import { Edit } from '@mui/icons-material'
4
import { Edit } from '@mui/icons-material'
-
 
5
 
7
import { axios } from '@app/utils'
6
import { axios } from '@app/utils'
8
import { addNotification } from '@app/redux/notification/notification.actions'
7
import { addNotification } from '@app/redux/notification/notification.actions'
-
 
8
 
9
import EmptySection from '@app/components/UI/EmptySection'
9
import TagsList from '@app/components/UI/TagsList'
-
 
10
import ProfileWidget from '../ProfileWidget'
-
 
11
import LanguagesModal from './LanguagesModal'
Línea 10... Línea 12...
10
 
12
 
11
const LanguagesCard = ({
13
const LanguagesCard = ({
12
  languages: defaultLanguages = {},
14
  languages: defaultLanguages = {},
13
  uuid = '',
15
  uuid = '',
Línea 57... Línea 59...
57
    <>
59
    <>
58
      <ProfileWidget
60
      <ProfileWidget
59
        title={labels.languages}
61
        title={labels.languages}
60
        action={
62
        action={
61
          edit && (
63
          edit && (
62
            <IconButton>
64
            <IconButton onClick={toggleModal}>
63
              <Edit />
65
              <Edit />
64
            </IconButton>
66
            </IconButton>
65
          )
67
          )
66
        }
68
        }
67
      >
69
      >
68
        {languages.length ? (
-
 
69
          <ul id='list-languages'>
70
        <TagsList tags={languages} />
70
            {languages.map(({ name, value }) => (
-
 
71
              <li key={value}>
-
 
72
                <span>{name}</span>
-
 
73
              </li>
-
 
74
            ))}
-
 
75
          </ul>
-
 
76
        ) : (
-
 
77
          <EmptySection align='left' message={labels.empty} />
-
 
78
        )}
-
 
79
      </ProfileWidget>
71
      </ProfileWidget>
Línea 80... Línea 72...
80
 
72
 
81
      <LanguagesModal
73
      <LanguagesModal
82
        show={showModal}
74
        show={showModal}