diff options
| author | Jacky Zhao <[email protected]> | 2020-09-03 23:35:31 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-03 23:35:31 -0700 |
| commit | 6d3c9267cda3c4b4642d7a5d3145bd943e5fecd0 (patch) | |
| tree | 9054620782559381948b508e6cebf8e7d953938d /frontend/src | |
| parent | Merge pull request #54 from jackyzha0/patch (diff) | |
| parent | add md class to preview renderer (diff) | |
| download | ctrl-v-6d3c9267cda3c4b4642d7a5d3145bd943e5fecd0.tar.xz ctrl-v-6d3c9267cda3c4b4642d7a5d3145bd943e5fecd0.zip | |
Merge pull request #56 from jackyzha0/patch
Diffstat (limited to 'frontend/src')
| -rw-r--r-- | frontend/src/components/App.js | 46 | ||||
| -rw-r--r-- | frontend/src/components/Inputs.js | 1 | ||||
| -rw-r--r-- | frontend/src/components/NewPaste.js | 2 | ||||
| -rw-r--r-- | frontend/src/components/ViewPaste.js | 2 | ||||
| -rw-r--r-- | frontend/src/components/renderers/Code.js | 1 |
5 files changed, 25 insertions, 27 deletions
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js index 0a5fb8b..543cd46 100644 --- a/frontend/src/components/App.js +++ b/frontend/src/components/App.js @@ -45,30 +45,32 @@ const App = () => { <Route path="/raw/:hash" children={<GetRawWithParam />} /> - <div className="lt-content-column"> - <SpacedTitle> - <nav> - <h1 className="mainLogo"> - <span role="img" aria-label="clipboard">📋 </span> - <Link to="/">ctrl-v</Link> - </h1> - <Desc /> - </nav> - </SpacedTitle> + <Route> + <div className="lt-content-column"> + <SpacedTitle> + <nav> + <h1 className="mainLogo"> + <span role="img" aria-label="clipboard">📋 </span> + <Link to="/">ctrl-v</Link> + </h1> + <Desc /> + </nav> + </SpacedTitle> - <main id="appElement"> - <Switch> - <Route path="/:hash" - children={<GetPasteWithParam />} - /> - <Route path="/"> - <NewPaste /> - </Route> - </Switch> - </main> + <main id="appElement"> + <Switch> + <Route path="/:hash" + children={<GetPasteWithParam />} + /> + <Route path="/"> + <NewPaste /> + </Route> + </Switch> + </main> - <Footer /> - </div> + <Footer /> + </div> + </Route> </Switch> </Router> ); diff --git a/frontend/src/components/Inputs.js b/frontend/src/components/Inputs.js index a9b08b7..d22e23f 100644 --- a/frontend/src/components/Inputs.js +++ b/frontend/src/components/Inputs.js @@ -118,7 +118,6 @@ const GenericDropdown = (props) => { <Dropdown options={props.options} onChange={_onSelect} - callBackRef={props.onChange} value={props.value} placeholder={props.placeholder} id={props.id} /> diff --git a/frontend/src/components/NewPaste.js b/frontend/src/components/NewPaste.js index 9729655..b276db8 100644 --- a/frontend/src/components/NewPaste.js +++ b/frontend/src/components/NewPaste.js @@ -101,7 +101,7 @@ const NewPaste = () => { break case 'markdown': preview = - <PreviewWrapper> + <PreviewWrapper className='md' > <Markdown content={content} /> </PreviewWrapper> diff --git a/frontend/src/components/ViewPaste.js b/frontend/src/components/ViewPaste.js index 2d69544..179321b 100644 --- a/frontend/src/components/ViewPaste.js +++ b/frontend/src/components/ViewPaste.js @@ -26,7 +26,6 @@ const ViewPaste = (props) => { const [language, setLanguage] = useState(LANGS.raw); const ErrorLabelRef = useRef(null); - const PasswordModalRef = useRef(null); const ComponentRef = useRef(null); function validatePass(pass, onErrorCallBack) { @@ -116,7 +115,6 @@ const ViewPaste = (props) => { return ( <div> <PasswordModal - ref={PasswordModalRef} hasPass={hasPass} validPass={validPass} value={enteredPass} diff --git a/frontend/src/components/renderers/Code.js b/frontend/src/components/renderers/Code.js index 3dbd544..a312c51 100644 --- a/frontend/src/components/renderers/Code.js +++ b/frontend/src/components/renderers/Code.js @@ -64,7 +64,6 @@ const CodeRenderer = React.forwardRef((props, ref) => { return ( <div className="lt-shadow"> <SyntaxHighlighter - ref={ref} language={LANGS[props.lang]} style={THEMES[props.theme]} showLineNumbers |