feat: remove mobile styles

This commit is contained in:
email
2022-03-11 05:07:04 +08:00
parent b597d40470
commit 8f7445c299
35 changed files with 9 additions and 490 deletions

View File

@ -1,6 +1,6 @@
import { useCallback, useContext, useEffect, useRef, useState } from "react";
import appContext from "../stores/appContext";
import { globalStateService, locationService } from "../services";
import { locationService } from "../services";
import { DAILY_TIMESTAMP } from "../helpers/consts";
import utils from "../helpers/utils";
import "../less/usage-heat-map.less";
@ -61,14 +61,9 @@ const UsageHeatMap: React.FC<Props> = () => {
return;
}
const { isMobileView } = globalStateService.getState();
const targetEl = event.target as HTMLElement;
const sidebarEl = document.querySelector(".sidebar-wrapper") as HTMLElement;
popupRef.current.style.left = targetEl.offsetLeft - (containerElRef.current?.offsetLeft ?? 0) + "px";
let topValue = targetEl.offsetTop;
if (!isMobileView) {
topValue -= sidebarEl.scrollTop;
}
const topValue = targetEl.offsetTop;
popupRef.current.style.top = topValue + "px";
}, []);