diff --git a/frontend/src/pages/shoppingLists/PreviousListsPage.tsx b/frontend/src/pages/shoppingLists/PreviousListsPage.tsx index 52213b7..d030bd0 100644 --- a/frontend/src/pages/shoppingLists/PreviousListsPage.tsx +++ b/frontend/src/pages/shoppingLists/PreviousListsPage.tsx @@ -5,11 +5,7 @@ import type { ShoppingList } from "../../types/shoppingList"; import "./PreviousListsPage.css"; import "./ShoppingListsPage.css"; import { mockLists } from "./shoppingListMockData"; - -const LIST_TABS = [ - { value: "active", label: "Aktive", to: "/lists" }, - { value: "previous", label: "Tidligere", to: "/lists/history" }, -]; +import { LIST_TABS } from "./shoppingListTabs"; diff --git a/frontend/src/pages/shoppingLists/ShoppingListsPage.tsx b/frontend/src/pages/shoppingLists/ShoppingListsPage.tsx index 6aa6aa3..9686d0d 100644 --- a/frontend/src/pages/shoppingLists/ShoppingListsPage.tsx +++ b/frontend/src/pages/shoppingLists/ShoppingListsPage.tsx @@ -4,15 +4,12 @@ import SegmentedControl from "../../components/segmentedControl/SegmentedControl import ShoppingListCard from "./ShoppingListCard"; import { mockLists } from "./shoppingListMockData"; import "./ShoppingListsPage.css"; +import { LIST_TABS } from "./shoppingListTabs"; type SortOrder = "newest" | "oldest" | "name-asc" | "name-desc"; const SORT_STORAGE_KEY = "active-lists-sort-order"; -const LIST_TABS = [ - { value: "active", label: "Aktive", to: "/lists" }, - { value: "previous", label: "Tidligere", to: "/lists/history" }, -]; function loadSortOrder(): SortOrder { try { diff --git a/frontend/src/pages/shoppingLists/shoppingListTabs.ts b/frontend/src/pages/shoppingLists/shoppingListTabs.ts new file mode 100644 index 0000000..8812419 --- /dev/null +++ b/frontend/src/pages/shoppingLists/shoppingListTabs.ts @@ -0,0 +1,4 @@ +export const LIST_TABS = [ + { value: "active", label: "Aktive", to: "/lists" }, + { value: "previous", label: "Tidligere", to: "/lists/history" }, +]; \ No newline at end of file