Skip to content

Commit

Permalink
Reformat file
Browse files Browse the repository at this point in the history
  • Loading branch information
a-dubaj committed May 20, 2022
1 parent b74ddc9 commit 6b2b97a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/NewPost.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useRef, useState } from "react";
import {useEffect, useRef, useState} from "react";
import * as faceapi from "face-api.js";

const NewPost = ({ image }) => {
const { url, width, height } = image;
const NewPost = ({image}) => {
const {url, width, height} = image;
const [faces, setFaces] = useState([]);
const [friends, setFriends] = useState([]);

Expand Down Expand Up @@ -39,14 +39,14 @@ const NewPost = ({ image }) => {
}, []);

const addFriend = (e) => {
setFriends((prev) => ({ ...prev, [e.target.name]: e.target.value }));
setFriends((prev) => ({...prev, [e.target.name]: e.target.value}));
};

console.log(friends);
return (
<div className="container">
<div className="left" style={{ width, height }}>
<img ref={imgRef} crossOrigin="anonymous" src={url} alt="" />
<div className="left" style={{width, height}}>
<img ref={imgRef} crossOrigin="anonymous" src={url} alt=""/>
<canvas
onMouseEnter={enter}
ref={canvasRef}
Expand All @@ -56,7 +56,7 @@ const NewPost = ({ image }) => {
{faces.map((face, i) => (
<input
name={`input${i}`}
style={{ left: face[0], top: face[1] + face[3] + 5 }}
style={{left: face[0], top: face[1] + face[3] + 5}}
placeholder="Tag a friend"
key={i}
className="friendInput"
Expand Down

0 comments on commit 6b2b97a

Please sign in to comment.