-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add redux for handling data-layer ws (re)connection (#644)
* add redux for handling data-layer ws connection and error handling * fix yield calls * add warning messages * remove pointer events when disconnected * add tests * remove dataLayer from sdk context * fix tests * fix leak of memory
- Loading branch information
Showing
59 changed files
with
1,188 additions
and
269 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/@dcl/inspector/src/components/ProjectAssetExplorer/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import { ProjectAssetExplorer } from './ProjectAssetExplorer' | ||
import ProjectAssetExplorer from './ProjectAssetExplorer' | ||
export { ProjectAssetExplorer } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...d/RotationGizmoLocalAlignmentDisabled.tsx → ...d/RotationGizmoLocalAlignmentDisabled.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
packages/@dcl/inspector/src/components/Warnings/SocketConnection/SocketConnection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
|
||
import { Warning } from '../Warning' | ||
import { useAppSelector } from '../../../redux/hooks' | ||
import { ErrorType, getError } from '../../../redux/data-layer' | ||
|
||
const mapError = { | ||
[ErrorType.Disconnected]: 'Socket disconnected. Please refresh the page', | ||
[ErrorType.Reconnecting]: 'Disconnected. Trying to reconnect...' | ||
} | ||
|
||
const SocketConnection: React.FC = () => { | ||
const error = useAppSelector(getError) | ||
if (!error) return null | ||
return <Warning title={mapError[error]} /> | ||
} | ||
|
||
export default React.memo(SocketConnection) |
2 changes: 2 additions & 0 deletions
2
packages/@dcl/inspector/src/components/Warnings/SocketConnection/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import SocketConnection from './SocketConnection' | ||
export { SocketConnection } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.