Handle connecting to websocket instance
Very beta code for handling sockets
This commit is contained in:
parent
6618a124e7
commit
f0ca8bc3a3
15 changed files with 297 additions and 30 deletions
6
resources/scripts/components/elements/Spinner.tsx
Normal file
6
resources/scripts/components/elements/Spinner.tsx
Normal file
|
@ -0,0 +1,6 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export default ({ large }: { large?: boolean }) => (
|
||||
<div className={classNames('spinner-circle spinner-white', { 'spinner-lg': large })}/>
|
||||
);
|
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
import Spinner from '@/components/elements/Spinner';
|
||||
|
||||
export default ({ large, visible }: { visible: boolean; large?: boolean }) => (
|
||||
<CSSTransition timeout={150} classNames={'fade'} in={visible} unmountOnExit={true}>
|
||||
|
@ -8,7 +9,7 @@ export default ({ large, visible }: { visible: boolean; large?: boolean }) => (
|
|||
className={classNames('absolute pin-t pin-l flex items-center justify-center w-full h-full rounded')}
|
||||
style={{ background: 'rgba(0, 0, 0, 0.45)' }}
|
||||
>
|
||||
<div className={classNames('spinner-circle spinner-white', { 'spinner-lg': large })}></div>
|
||||
<Spinner large={large}/>
|
||||
</div>
|
||||
</CSSTransition>
|
||||
);
|
||||
|
|
Reference in a new issue