mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: remove mobile styles
This commit is contained in:
@ -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";
|
||||
}, []);
|
||||
|
||||
|
Reference in New Issue
Block a user