chore: optimizations and file name changes (#2845)

* fix: deepsource antipatterns

* fix: deepsource exclude file patterns

* chore: file name changes and removed unwanted variables

* fix: changing version number for editor
This commit is contained in:
sriram veeraghanta 2023-11-23 15:09:46 +05:30
parent d6abb87a3a
commit fa8ae6b8ce
47 changed files with 381 additions and 349 deletions

View file

@ -102,14 +102,14 @@ export class PageStore implements IPageStore {
const data: IRecentPages = { today: [], yesterday: [], this_week: [], older: [] };
data["today"] = this.pages[projectId]?.filter((p) => isToday(new Date(p.created_at))) || [];
data["yesterday"] = this.pages[projectId]?.filter((p) => isYesterday(new Date(p.created_at))) || [];
data["this_week"] =
data.today = this.pages[projectId]?.filter((p) => isToday(new Date(p.created_at))) || [];
data.yesterday = this.pages[projectId]?.filter((p) => isYesterday(new Date(p.created_at))) || [];
data.this_week =
this.pages[projectId]?.filter(
(p) =>
isThisWeek(new Date(p.created_at)) && !isToday(new Date(p.created_at)) && !isYesterday(new Date(p.created_at))
) || [];
data["older"] =
data.older =
this.pages[projectId]?.filter(
(p) => !isThisWeek(new Date(p.created_at)) && !isYesterday(new Date(p.created_at))
) || [];