remove some logs
This commit is contained in:
		
							parent
							
								
									88d98edbce
								
							
						
					
					
						commit
						a58743344c
					
				
					 2 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
					@ -17,7 +17,6 @@ export default function CommentForm({ url, site, path }) {
 | 
				
			||||||
    const [error, setError] = useState(null);
 | 
					    const [error, setError] = useState(null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const handleSubmit = e => {
 | 
					    const handleSubmit = e => {
 | 
				
			||||||
        console.log(e);
 | 
					 | 
				
			||||||
        e.preventDefault();
 | 
					        e.preventDefault();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let form = {
 | 
					        let form = {
 | 
				
			||||||
| 
						 | 
					@ -52,7 +51,6 @@ export default function CommentForm({ url, site, path }) {
 | 
				
			||||||
            body: JSON.stringify(form)
 | 
					            body: JSON.stringify(form)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
          .then(response => {
 | 
					          .then(response => {
 | 
				
			||||||
              console.log(response);
 | 
					 | 
				
			||||||
              if (response.ok) {
 | 
					              if (response.ok) {
 | 
				
			||||||
                  window.location.reload();
 | 
					                  window.location.reload();
 | 
				
			||||||
              } else {
 | 
					              } else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,7 @@ export default function CommentList({ url, site, path }) {
 | 
				
			||||||
    const [comments, setComments] = useState([]);
 | 
					    const [comments, setComments] = useState([]);
 | 
				
			||||||
    useEffect(() => {
 | 
					    useEffect(() => {
 | 
				
			||||||
        fetch(url + '/api/' + site + '/' + path)
 | 
					        fetch(url + '/api/' + site + '/' + path)
 | 
				
			||||||
          .then(response => { console.log(response); return response.json() })
 | 
					          .then(response => { return response.json() })
 | 
				
			||||||
          .then(data => setComments(data))
 | 
					          .then(data => setComments(data))
 | 
				
			||||||
          .catch(error => {
 | 
					          .catch(error => {
 | 
				
			||||||
              console.log(error);
 | 
					              console.log(error);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue