Skip to content
Snippets Groups Projects
Commit 20d5f203 authored by Anthony's avatar Anthony
Browse files

Clean code after fixing ref forwarding, removing console.log

parent fcf8de60
No related branches found
No related tags found
2 merge requests!11Fix forward ref from Canvas Annotation Wrapper to CanvasAnnotation,!10Draft: MigratingAnnotationCreation to MUI5.
Pipeline #1682 failed
...@@ -171,7 +171,6 @@ class AnnotationCreation extends Component { ...@@ -171,7 +171,6 @@ class AnnotationCreation extends Component {
componentDidMount() { componentDidMount() {
const mediaVideo = VideosReferences.get(this.props.windowId); const mediaVideo = VideosReferences.get(this.props.windowId);
this.setState({ mediaVideo }); // Update mediaVideo in state this.setState({ mediaVideo }); // Update mediaVideo in state
console.log('MEDIAVIDEO COMPONENTDIDMOUNT:', mediaVideo)
} }
/** */ /** */
handleImgChange(newUrl, imgRef) { handleImgChange(newUrl, imgRef) {
...@@ -430,8 +429,6 @@ class AnnotationCreation extends Component { ...@@ -430,8 +429,6 @@ class AnnotationCreation extends Component {
} }
const isVideoDataLoaded = mediaVideo && mediaVideo.video && !isNaN(mediaVideo.video.duration) && mediaVideo.video.duration > 0; const isVideoDataLoaded = mediaVideo && mediaVideo.video && !isNaN(mediaVideo.video.duration) && mediaVideo.video.duration > 0;
console.log(isVideoDataLoaded)
return ( return (
<CompanionWindow <CompanionWindow
......
...@@ -20,8 +20,6 @@ class CanvasListItem extends Component { ...@@ -20,8 +20,6 @@ class CanvasListItem extends Component {
this.handleMouseHover = this.handleMouseHover.bind(this); this.handleMouseHover = this.handleMouseHover.bind(this);
this.handleDelete = this.handleDelete.bind(this); this.handleDelete = this.handleDelete.bind(this);
this.handleEdit = this.handleEdit.bind(this); this.handleEdit = this.handleEdit.bind(this);
console.log(props.ref);
} }
/** */ /** */
...@@ -86,9 +84,6 @@ class CanvasListItem extends Component { ...@@ -86,9 +84,6 @@ class CanvasListItem extends Component {
/** */ /** */
render() { render() {
const { children } = this.props;
console.log('canvaslistItem children :', this.props.children);
console.log('this.props : ', ...this.props);
const { isHovering } = this.state; const { isHovering } = this.state;
const { windowViewType, toggleSingleCanvasDialogOpen } = this.context; const { windowViewType, toggleSingleCanvasDialogOpen } = this.context;
...@@ -130,7 +125,6 @@ class CanvasListItem extends Component { ...@@ -130,7 +125,6 @@ class CanvasListItem extends Component {
<li <li
{...this.props} // eslint-disable-line react/jsx-props-no-spreading {...this.props} // eslint-disable-line react/jsx-props-no-spreading
> >
{/* {children} */}
</li> </li>
</div> </div>
); );
......
...@@ -26,15 +26,12 @@ const StyledRoot = styled('div')({ ...@@ -26,15 +26,12 @@ const StyledRoot = styled('div')({
function HMSInput({ seconds, onChange }) { function HMSInput({ seconds, onChange }) {
const [hms, setHms] = useState(secondsToHMSarray(0)); const [hms, setHms] = useState(secondsToHMSarray(0));
console.log('hms', hms);
useEffect(() => { useEffect(() => {
if(seconds != null) { if(seconds != null) {
console.log('seconds', seconds);
setHms(secondsToHMSarray(seconds)); setHms(secondsToHMSarray(seconds));
} }
}, [seconds]); }, [seconds]);
console.log('seconds AFTER USEEFFECT', seconds);
const someChange = (ev) => { const someChange = (ev) => {
const newState = secondsToHMSarray(Number(ev.target.value)); const newState = secondsToHMSarray(Number(ev.target.value));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment