From 28f0e55475ecac41034e3fac8c48ea0a332d364c Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Wed, 13 May 2020 23:34:12 -0700 Subject: on new paste modal --- frontend/src/components/NewPaste.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'frontend/src/components/NewPaste.js') diff --git a/frontend/src/components/NewPaste.js b/frontend/src/components/NewPaste.js index f48f48b..0b1c795 100644 --- a/frontend/src/components/NewPaste.js +++ b/frontend/src/components/NewPaste.js @@ -1,9 +1,9 @@ import React from 'react'; import { TitleInput, PasteInput } from './Inputs' import OptionsContainer from './Options' -import { Redirect } from 'react-router-dom' import Error from './Err' import { PostNewPaste } from '../helpers/httpHelper' +import PasteModal from './modals/PasteModal' class NewPaste extends React.Component { constructor(props) { @@ -22,13 +22,6 @@ class NewPaste extends React.Component { this.ErrorLabel = React.createRef(); } - renderRedirect = () => { - if (this.state.hash !== '') { - const redirUrl = `/${this.state.hash}` - return - } - } - componentDidUpdate() { if (this.state.title === "") { document.title = `ctrl-v`; @@ -69,7 +62,7 @@ class NewPaste extends React.Component { render() { return (
- {this.renderRedirect()} +