Skip to content

A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.

chore: remove dead code

towfiqi709ddfec6d58
diff --git a/frontend/src/routes/Plans/Plans.tsx b/frontend/src/routes/Plans/Plans.tsx
index cccccb8..fd3e2f7 100644
--- a/frontend/src/routes/Plans/Plans.tsx
+++ b/frontend/src/routes/Plans/Plans.tsx
@@ -1,9 +1,8 @@
-import { useEffect, useMemo, useState } from 'react';
+import { useEffect, useState } from 'react';
import classes from './Plans.module.scss';
import PageHeader from '../../components/common/PageHeader/PageHeader';
import PlanItem from '../../components/Plan/PlanItems/PlanItem';
import AddPlan from '../../components/Plan/AddPlan/AddPlan';
-import TagsFilter from '../../components/common/TagsFilter/TagsFilter';
import SearchItems from '../../components/common/SearchItems/SearchItems';
import SortItems from '../../components/common/SortItems/SortItems';
import { useGetPlans } from '../../services/plans';
@@ -41,29 +40,6 @@ const Plans = () => {
// console.log('plans :', plans);
- const allTags = useMemo(() => {
- const tags: string[] = [];
- if (plans && plans.length > 0) {
- plans.forEach((plan) => {
- plan.tags.forEach((tag) => {
- if (!tags.includes(tag)) {
- tags.push(tag);
- }
- });
- });
- }
-
- return tags;
- }, [plans]);
-
- const filterByTags = (tag: string) => {
- if (tag) {
- setPlans(fetchedPlans.filter((p) => p.tags.includes(tag)));
- } else {
- setPlans(fetchedPlans);
- }
- };
-
const searchPlans = (term: string) => {
if (term) {
setPlans(fetchedPlans.filter((p) => p.title.toLowerCase().includes(term.toLowerCase())));