Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI sample for message broadcast #2

Merged
merged 5 commits into from Jun 9, 2021
Merged

UI sample for message broadcast #2

merged 5 commits into from Jun 9, 2021

Conversation

awrichar
Copy link
Contributor

@awrichar awrichar commented Jun 9, 2021

No description provided.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@awrichar awrichar requested a review from shorsher June 9, 2021 14:00
@awrichar awrichar changed the title UI UI sample for message broadcast Jun 9, 2021
Removed a few things that will come back when private data is ready. For
now, this can actually show all received messages and send a new
broadcast.

Still to add: dynamically show new messages (instead of needing a refresh),
show two parties side-by-side (instead of only one party).

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Very rudimentary refresh mechanism.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"reconnecting-websocket": "^4.4.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

import { useCallback, useEffect, useRef, useState } from 'react';
import { FireFly, FireFlyData, FireFlyMessage } from './firefly';
import ReconnectingWebsocket from 'reconnecting-websocket';
import './App.css';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the use of makeStyles, we can get rid of App.css

@@ -0,0 +1 @@
/// <reference types="react-scripts" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just leave this out and add it to your .gitignore, it gets autogenerated by CRA each time but is useless
https://stackoverflow.com/questions/53527763/create-react-app-typescript-auto-generating-react-app-env-d-ts-in-src-director

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@awrichar awrichar merged commit 0e4f22e into master Jun 9, 2021
@awrichar awrichar deleted the ui branch June 9, 2021 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants