Skip to content

πŸ“ˆ Open source, privacy-first web analytics β€” a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix lint error

Maksim Mrug077b55704bf1
diff --git a/src/pages/Project/View/ViewProject.tsx b/src/pages/Project/View/ViewProject.tsx
index 7808be055..1629bdcd3 100644
--- a/src/pages/Project/View/ViewProject.tsx
+++ b/src/pages/Project/View/ViewProject.tsx
@@ -173,7 +173,7 @@ const ViewProject = ({
const project: IProjectForShared = useMemo(() => _find([...projects, ..._map(sharedProjects, (item) => ({ ...item.project, role: item.role }))], p => p.id === id) || {} as IProjectForShared, [projects, id, sharedProjects])
const projectPassword: string = useMemo(() => password[id] || getItem(PROJECTS_PROTECTED)?.[id] || '', [id, password])
-
+
/* isSharedProject is a boolean check if project is shared. If isSharedProject is true,
we used role and other colummn from sharedProjects.
And it is used for remove settings button when user have role viewer or logic with Alert tabs */
@@ -385,9 +385,9 @@ const ViewProject = ({
const { name } = project
const pageTitle = user?.showLiveVisitorsInTitle ? `πŸ‘€ ${liveStats[id]} - ${name}` : name
-
- const sharedRoles = useMemo(() => _find(user.sharedProjects, p => p.project.id === id)?.role || {}, [user, id])
+
// sharedRoles is a role for shared project
+ const sharedRoles = useMemo(() => _find(user.sharedProjects, p => p.project.id === id)?.role || {}, [user, id])
// chartMetrics is a list of metrics for dropdown
const chartMetrics = useMemo(() => {
@@ -687,10 +687,9 @@ const ViewProject = ({
} else {
key = getProjectCacheKey(period, timeBucket)
}
-
+
// check if we need to load new date or we have data in redux/localstorage
if (!forced && !_isEmpty(cache[id]) && !_isEmpty(cache[id][key]) && !_isEmpty(newFilters || filters)) {
-
data = cache[id][key]
} else {
if (period === 'custom' && dateRange) {