Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3265 Rev 3559
Línea 1... Línea 1...
1
import React, { useState } from 'react'
1
import React, { useState } from 'react';
2
import { Avatar, Typography } from '@mui/material'
2
import { Avatar, Typography } from '@mui/material';
Línea 3... Línea 3...
3
 
3
 
4
import { getOnRoom } from '@services/onRoom'
4
import { getOnRoom } from '@services/onRoom';
Línea 5... Línea 5...
5
import { addNotification } from '@store/notification/notification.actions'
5
import { addNotification } from '@store/notification/notification.actions';
6
 
6
 
Línea 7... Línea 7...
7
import Widget from '@components/UI/Widget'
7
import Widget from '@components/UI/Widget';
8
import Spinner from '@components/UI/Spinner'
8
import Spinner from '@components/UI/Spinner';
Línea 9... Línea 9...
9
 
9
 
10
export default function OnRoomWidget({ moodle }) {
10
export default function OnRoomWidget({ moodle }) {
11
  const [loading, setLoading] = useState(false)
11
  const [loading, setLoading] = useState(false);
12
 
12
 
-
 
13
  const handleOnRoom = async () => {
13
  const handleOnRoom = async () => {
14
    try {
14
    try {
15
      setLoading(true);
15
      setLoading(true)
16
      const onRoomUrl = await getOnRoom();
16
      const onRoomUrl = await getOnRoom()
17
      console.log(onRoomUrl);
17
      window.open(onRoomUrl, '_blank')
18
      window.open(onRoomUrl, '_blank');
18
    } catch (error) {
19
    } catch (error) {
19
      addNotification({ style: 'danger', msg: error.message })
20
      addNotification({ style: 'danger', msg: error.message });
Línea 20... Línea 21...
20
    } finally {
21
    } finally {
21
      setLoading(false)
22
      setLoading(false);
22
    }
23
    }
23
  }
24
  };
Línea 37... Línea 38...
37
          Plataforma de Capacitación CESA ON ROOM
38
          Plataforma de Capacitación CESA ON ROOM
38
          {/* {moodle.name} */}
39
          {/* {moodle.name} */}
39
        </Typography>
40
        </Typography>
40
      </Widget.Body>
41
      </Widget.Body>
41
    </Widget>
42
    </Widget>
42
  )
43
  );
43
}
44
}