Skip to content
Snippets Groups Projects
Commit bf496ba3 authored by Min Dong Hyeun's avatar Min Dong Hyeun
Browse files

[EDIT]오류 수정

parent a10e4da0
Branches
No related tags found
No related merge requests found
...@@ -2,4 +2,3 @@ ...@@ -2,4 +2,3 @@
# Ignore node_modules directory # Ignore node_modules directory
node_modules/ node_modules/
package.json/
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "export PORT=80 && react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"
......
...@@ -11,15 +11,14 @@ function LinkPageForm() { ...@@ -11,15 +11,14 @@ function LinkPageForm() {
const {id} = location.state; const {id} = location.state;
const copyToClipboard = () => { const copyToClipboard = async (link) => {
const textToCopy = `localhost:3000/HomeParticipate/${id}`; try {
const tempInput = document.createElement('input'); const textToCopy = `https://when-meet.link/HomeParticipate/${id}`;
document.body.appendChild(tempInput); await navigator.clipboard.writeText(textToCopy);
tempInput.value = textToCopy; alert('클립보드에 복사되었습니다');
tempInput.select(); } catch (err) {
document.execCommand('copy'); alert('클립보드 복사에 실패하였습니다');
document.body.removeChild(tempInput); }
alert('클립보드에 복사되었습니다');
}; };
const handleSubmit = async(event) => { const handleSubmit = async(event) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment