diff --git a/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts b/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts index 707488f..dc25805 100644 --- a/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts +++ b/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts @@ -62,8 +62,8 @@ export const Time = styled.div` `} background-image: linear-gradient( - ${props => `${props.theme.primary}${Math.round(((props.peopleCount-props.minPeople)/(props.maxPeople-props.minPeople))*255).toString(16)}`}, - ${props => `${props.theme.primary}${Math.round(((props.peopleCount-props.minPeople)/(props.maxPeople-props.minPeople))*255).toString(16)}`} + ${props => `${props.theme.primary}${Math.round(((props.peopleCount)/(props.maxPeople))*255).toString(16)}`}, + ${props => `${props.theme.primary}${Math.round(((props.peopleCount)/(props.maxPeople))*255).toString(16)}`} ); `; diff --git a/crabfit-frontend/src/components/Legend/Legend.tsx b/crabfit-frontend/src/components/Legend/Legend.tsx index 16a51e3..978d317 100644 --- a/crabfit-frontend/src/components/Legend/Legend.tsx +++ b/crabfit-frontend/src/components/Legend/Legend.tsx @@ -21,11 +21,11 @@ const Legend = ({ onSegmentFocus(null)}> - {[...Array(max-min+1).keys()].map(i => + {[...Array(max+1-min).keys()].map(i => i+min).map(i => onSegmentFocus(i+min)} + color={`${theme.primary}${Math.round((i/(max))*255).toString(16)}`} + onMouseOver={() => onSegmentFocus(i)} /> )} diff --git a/crabfit-frontend/src/pages/Event/Event.tsx b/crabfit-frontend/src/pages/Event/Event.tsx index 52ea2f1..3184ab8 100644 --- a/crabfit-frontend/src/pages/Event/Event.tsx +++ b/crabfit-frontend/src/pages/Event/Event.tsx @@ -286,7 +286,7 @@ const Event = (props) => { {(!!event || isLoading) ? ( <> {event?.name} - {event?.created && `Created ${dayjs.unix(event?.created).fromNow()}`} + {event?.created && `Created ${dayjs.unix(event?.created).fromNow()}`} navigator.clipboard?.writeText(`https://crab.fit/${id}`) .then(() => {