diff options
| author | jackyzha0 <[email protected]> | 2021-04-11 10:27:27 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2021-04-11 10:27:27 -0700 |
| commit | 0144bfc9cc6c616a00a8171f3950a75ec948427e (patch) | |
| tree | 101d6c12471d411e9266cffa8e90176aff2e6fdb /frontend/src/components/modals/PasteModal.js | |
| parent | base next bump (diff) | |
| download | ctrl-v-0144bfc9cc6c616a00a8171f3950a75ec948427e.tar.xz ctrl-v-0144bfc9cc6c616a00a8171f3950a75ec948427e.zip | |
base next refactor
Diffstat (limited to 'frontend/src/components/modals/PasteModal.js')
| -rw-r--r-- | frontend/src/components/modals/PasteModal.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/components/modals/PasteModal.js b/frontend/src/components/modals/PasteModal.js index e7dbed2..a0fd309 100644 --- a/frontend/src/components/modals/PasteModal.js +++ b/frontend/src/components/modals/PasteModal.js @@ -1,21 +1,21 @@ import React from 'react'; import Modal from 'react-modal'; import {Form, ModalHeader, modalStyles} from './shared' -import { useHistory } from 'react-router-dom'; +import { useRouter } from 'next/router' import { Text } from '../Inputs' import { useClipboard } from 'use-clipboard-copy'; import {Button} from "../Common/Button"; const PasteModal = (props) => { - const history = useHistory(); - const fullURL = `${window.location.origin}/${props.hash}`; + const fullURL = `https://ctrl-v.app/${props.hash}`; const clipboard = useClipboard({ copiedTimeout: 3000 }); Modal.setAppElement('body'); + const router = useRouter() const redir = (e) => { e.preventDefault(); const redirUrl = `/${props.hash}` - history.push(redirUrl); + router.push(redirUrl); } return ( |