diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-22 17:02:50 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-22 17:02:50 -0700 |
commit | cfee19c8faad0eb5216e49f174e27aeb388e7830 (patch) | |
tree | 48b64b0fd00caafdfa02e1e4f8b45aa8a28025f2 /extension/react-app/src/components | |
parent | 589fd45fb13c17a1bd13d758806946b55d157a22 (diff) | |
download | sncontinue-cfee19c8faad0eb5216e49f174e27aeb388e7830.tar.gz sncontinue-cfee19c8faad0eb5216e49f174e27aeb388e7830.tar.bz2 sncontinue-cfee19c8faad0eb5216e49f174e27aeb388e7830.zip |
added continue retro button icon
Diffstat (limited to 'extension/react-app/src/components')
-rw-r--r-- | extension/react-app/src/components/ContinueButton.tsx | 13 | ||||
-rw-r--r-- | extension/react-app/src/components/DebugPanel.tsx | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/extension/react-app/src/components/ContinueButton.tsx b/extension/react-app/src/components/ContinueButton.tsx index c6117bf9..ef6719b7 100644 --- a/extension/react-app/src/components/ContinueButton.tsx +++ b/extension/react-app/src/components/ContinueButton.tsx @@ -1,6 +1,8 @@ import styled, { keyframes } from "styled-components"; import { Button } from "."; import { Play } from "@styled-icons/heroicons-outline"; +import { useSelector } from "react-redux"; +import { RootStore } from "../redux/store"; let StyledButton = styled(Button)` margin: auto; @@ -25,14 +27,21 @@ let StyledButton = styled(Button)` `; function ContinueButton(props: { onClick?: () => void; hidden?: boolean }) { + const vscMediaUrl = useSelector( + (state: RootStore) => state.config.vscMediaUrl + ); + return ( <StyledButton hidden={props.hidden} className="m-auto" onClick={props.onClick} > - <Play /> - {/* <img src={"/continue_arrow.png"} width="16px"></img> */} + {vscMediaUrl ? ( + <img src={`${vscMediaUrl}/play_button.png`} width="22px" /> + ) : ( + <Play /> + )} Continue </StyledButton> ); diff --git a/extension/react-app/src/components/DebugPanel.tsx b/extension/react-app/src/components/DebugPanel.tsx index 30f38779..94dbac9e 100644 --- a/extension/react-app/src/components/DebugPanel.tsx +++ b/extension/react-app/src/components/DebugPanel.tsx @@ -6,6 +6,7 @@ import { setApiUrl, setVscMachineId, setSessionId, + setVscMediaUrl, } from "../redux/slices/configSlice"; import { setHighlightedCode } from "../redux/slices/miscSlice"; import { updateFileSystem } from "../redux/slices/debugContexSlice"; @@ -37,6 +38,7 @@ function DebugPanel(props: DebugPanelProps) { dispatch(setApiUrl(event.data.apiUrl)); dispatch(setVscMachineId(event.data.vscMachineId)); dispatch(setSessionId(event.data.sessionId)); + dispatch(setVscMediaUrl(event.data.vscMediaUrl)); break; case "highlightedCode": dispatch(setHighlightedCode(event.data.rangeInFile)); |