Skip to content

Commit

Permalink
Show link to project page if web serial isn't supported too
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbez1 committed Oct 9, 2023
1 parent c3297b1 commit ef8d7dc
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions software/chainlink/js/packages/example-webserial-basic/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export const App: React.FC<AppProps> = () => {
</form>
</>
) : navigator.serial ? (
<div>
<>
<Typography variant="h4" color="inherit">
Welcome
</Typography>
Expand All @@ -269,16 +269,21 @@ export const App: React.FC<AppProps> = () => {
<Button onClick={connectToSerial} variant="contained">
Connect via Web Serial
</Button>
<Typography variant="body1">
<p><b>Haven't built a display yet, or want to learn more?</b> Check out the <Link href="3d_viewer/">project landing page</Link> to see
an interactive 3d model and read more about the project.</p>
</Typography>
</div>
</>
) : (
<Typography>
Sorry, Web Serial API isn't available in your browser. Try the latest version of Chrome.
</Typography>
)}

{ splitflap === null ?
<Typography variant="body1">
<p><b>Haven't built a display yet, or want to learn more?</b> Check out the <Link href="3d_viewer/">project landing page</Link> to see
an interactive 3d model and read more about the project.</p>
</Typography>
:
null
}
</CardContent>
</Card>
</Container>
Expand Down

0 comments on commit ef8d7dc

Please sign in to comment.