Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5173 Rev 5282
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React, { useState } from 'react'
2
import React, { useState } from 'react'
3
import styled from 'styled-components'
-
 
4
import { addNotification } from '../../../redux/notification/notification.actions'
3
import { addNotification } from '../../../redux/notification/notification.actions'
5
import Spinner from '../../../shared/loading-spinner/Spinner'
4
import Spinner from '../../../shared/loading-spinner/Spinner'
6
import { axios } from '../../../utils'
5
import { axios } from '../../../utils'
Línea 7... Línea 6...
7
 
6
 
8
const StyledSpinnerContainer = styled.div`
7
const SocialNetworks = ({
9
  position: absolute;
8
  className = 'peopleYouMayKnow',
10
  left: 0;
9
  LABELS = {}
11
  top: 0;
-
 
12
  width: 100%;
-
 
13
  height: 100%;
-
 
14
  background: rgba(255, 255, 255, 0.4);
-
 
15
  display: flex;
-
 
16
  justify-content: center;
-
 
17
  align-items: center;
-
 
18
  z-index: 300;
-
 
19
`
-
 
20
 
-
 
21
export default function SocialNetworks ({ className = 'peopleYouMayKnow', LABELS = {} }) {
10
}) => {
-
 
11
  const [loading, setLoading] = useState(false)
22
  const [loading, setLoading] = useState(false)
12
 
23
  const handleOnRoom = async () => {
13
  const handleOnRoom = async () => {
24
    try {
14
    try {
25
      setLoading(true)
15
      setLoading(true)
26
      const response = await axios.post('/moodle')
16
      const response = await axios.post('/moodle')
Línea 50... Línea 40...
50
      })
40
      })
51
    } finally {
41
    } finally {
52
      setLoading(false)
42
      setLoading(false)
53
    }
43
    }
54
  }
44
  }
-
 
45
 
55
  return (
46
  return (
56
        <div className={className}>
47
    <div className={`app-widget ${className}`}>
57
            <div className='widget__app'>
48
      {loading && <Spinner />}
58
                <a href="#" onClick={() => handleOnRoom()}>
49
      <div className='d-flex flex-column gap-2' onClick={() => handleOnRoom()}>
59
                    <img
-
 
60
                        className='widget__app__img'
-
 
61
                        src="/images/logo-onroom.png"
50
        <img src="/images/logo-onroom.png" alt="" />
62
                        alt=""
-
 
63
                    />
-
 
64
                </a>
-
 
65
                <a href="#" onClick={() => handleOnRoom()} className={'widget__app__title'} title="">
-
 
66
                    CESA ON ROOM
51
        CESA ON ROOM
67
                </a>
-
 
68
            </div>
52
      </div>
-
 
53
 
69
            <div className='widget__app'>
54
      <div className='d-flex gap-2'>
70
                <div className="d-flex" style={{ gap: '5px' }}>
-
 
71
                    <a
55
        <a
72
                        href='https://play.google.com/store/apps/details?id=com.cesams.twogetskills'
56
          href='https://play.google.com/store/apps/details?id=com.cesams.twogetskills'
73
                        target="_blank" rel="noreferrer"
57
          target="_blank"
74
                    >
58
          rel="noreferrer"
75
                        <img
59
        >
76
                            className='widget__app__img'
-
 
77
                            src="/images/logo-2getskills-android.jpeg"
60
          <img src="/images/logo-2getskills-android.jpeg" alt="" />
78
                            alt=""
-
 
79
                        />
-
 
80
                    </a>
61
        </a>
81
                    <a
62
        <a
82
                        href='https://apps.apple.com/us/app/2getskills/id1575789638'
63
          href='https://apps.apple.com/us/app/2getskills/id1575789638'
83
                        target="_blank" rel="noreferrer"
-
 
84
                    >
64
          target="_blank"
85
                        <img
-
 
86
                            className='widget__app__img'
-
 
87
                            src="/images/logo-2getskillsa-apple.jpeg"
-
 
88
                            alt=""
-
 
89
                        />
65
          rel="noreferrer"
90
                    </a>
-
 
91
                </div>
66
        >
92
                <a href="#" className='widget__app__title' title="">
67
          <img src="/images/logo-2getskillsa-apple.jpeg" alt="" />
93
                    {LABELS.MICRO_LEARNING}
-
 
94
                </a>
68
        </a>
95
            </div>
69
      </div>
-
 
70
 
96
            {loading &&
71
      <a href="#">
97
                <StyledSpinnerContainer>
-
 
98
                    <Spinner />
72
        {LABELS.MICRO_LEARNING}
99
                </StyledSpinnerContainer>
-
 
100
            }
73
      </a>
101
        </div>
74
    </div>
102
  )
75
  )
103
}
76
}
-
 
77
 
-
 
78
export default SocialNetworks