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

[EDIT]error edir

parent 96c95601
No related branches found
No related tags found
No related merge requests found
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
# 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": "export PORT=80 && react-scripts start", "start": "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,14 +11,15 @@ function LinkPageForm() { ...@@ -11,14 +11,15 @@ function LinkPageForm() {
const {id} = location.state; const {id} = location.state;
const copyToClipboard = async (link) => { const copyToClipboard = () => {
try { const textToCopy = `localhost:3000/HomeParticipate/${id}`;
const textToCopy = `localhost:3000/HomeParticipate/${id}`; const tempInput = document.createElement('input');
await navigator.clipboard.writeText(textToCopy); document.body.appendChild(tempInput);
alert('클립보드에 복사되었습니다'); tempInput.value = textToCopy;
} catch (err) { tempInput.select();
alert('클립보드 복사에 실패하였습니다'); document.execCommand('copy');
} document.body.removeChild(tempInput);
alert('클립보드에 복사되었습니다');
}; };
const handleSubmit = async(event) => { const handleSubmit = async(event) => {
...@@ -30,6 +31,7 @@ function LinkPageForm() { ...@@ -30,6 +31,7 @@ function LinkPageForm() {
return ( return (
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
<div> <div>
<p>hey</p>
<Input <Input
value={`localhost:3000/HomeParticipate/${id}`} value={`localhost:3000/HomeParticipate/${id}`}
/> />
......
...@@ -31,6 +31,7 @@ function MeetingInfoForm() { ...@@ -31,6 +31,7 @@ function MeetingInfoForm() {
setNumber(inputValue); setNumber(inputValue);
} else { } else {
alert("양수만을 입력하세요"); alert("양수만을 입력하세요");
setNumber("");
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment