mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-13 05:48:36 +03:00
Using prettier for linting
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import React from "react";
|
||||
|
||||
export default ({
|
||||
offset,
|
||||
@@ -10,17 +10,19 @@ export default ({
|
||||
dims,
|
||||
colour,
|
||||
eventRadius,
|
||||
onClick
|
||||
onClick,
|
||||
}) => {
|
||||
const length = getX(end) - getX(start)
|
||||
if (offset === undefined) return null
|
||||
return <rect
|
||||
onClick={onClick}
|
||||
className='project'
|
||||
x={getX(start)}
|
||||
y={dims.marginTop + offset}
|
||||
width={length}
|
||||
style={{ fill: colour, fillOpacity: 0.2 }}
|
||||
height={2 * eventRadius}
|
||||
/>
|
||||
}
|
||||
const length = getX(end) - getX(start);
|
||||
if (offset === undefined) return null;
|
||||
return (
|
||||
<rect
|
||||
onClick={onClick}
|
||||
className="project"
|
||||
x={getX(start)}
|
||||
y={dims.marginTop + offset}
|
||||
width={length}
|
||||
style={{ fill: colour, fillOpacity: 0.2 }}
|
||||
height={2 * eventRadius}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user