Skip to content

Commit

Permalink
break up contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeveber committed Sep 15, 2024
1 parent b0d9f2a commit d6bee10
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/contexts/selectors/index.ts → src/contexts/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useDataContext } from "../DataProvider";
import { useDataContext } from "./DataProvider";

// -- Display -------------------------------------------------------------- //

Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/ChartsTab.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import CircularProgress from "@mui/material/CircularProgress";
import { useTabCount, useWindowCount } from "src/contexts/selectors";
import { useTabCount, useWindowCount } from "src/contexts";
import Charts from "./charts/Charts";

export default function ChartsTab() {
Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/WindowsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Grid from "@mui/material/Grid2";
import Stack from "@mui/material/Stack";
import { styled } from "@mui/material/styles";
import { useMemo } from "react";
import { useTabCount, useWindowCount, useWindows } from "src/contexts/selectors";
import { useTabCount, useWindowCount, useWindows } from "src/contexts";
import WindowsHeader, { Loading as HeaderLoading } from "./window/header/WindowsHeader";
import WindowLoading from "./window/WindowLoading";
import WindowView from "./window/WindowView";
Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/charts/Charts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Tooltip from "@mui/material/Tooltip";
import Typography from "@mui/material/Typography";
import { ChartData } from "chart.js";
import { ChangeEvent, MouseEvent, useMemo, useState } from "react";
import { useAllTabs, useFilters } from "src/contexts/selectors";
import { useAllTabs, useFilters } from "src/contexts";
import { getChartData } from "src/utils/chartjs";
import { groupTabs } from "src/utils/chrome";
import ChartPane, { type ChartViewType } from "./ChartPane";
Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/charts/SectionBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Autocomplete from "@mui/material/Autocomplete";
import Box from "@mui/material/Box";
import TextField from "@mui/material/TextField";
import { HTMLAttributes, SyntheticEvent, useMemo, useState } from "react";
import { useAllTabs } from "src/contexts";
import { useFilterDispatch } from "src/contexts/DataProvider";
import { useAllTabs } from "src/contexts/selectors";
import { TAB_PROPERTIES } from "src/utils/chrome";
import { FILTER_TAB_PROPERTIES } from "src/utils/filterTabs";
import TabPropertyIcon, { getTabPropertyLabel } from "../window/TabPropertyIcon";
Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/window/TabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import ListItemText from "@mui/material/ListItemText";
import { ChangeEvent, useRef } from "react";
import ListItem from "src/components/list/ListItem";
import ListItemFavicon from "src/components/list/ListItemFavicon";
import { useIsFiltered, useSelectedTabs } from "src/contexts";
import { useSelectedTabsDispatch } from "src/contexts/DataProvider";
import { useIsFiltered, useSelectedTabs } from "src/contexts/selectors";
import { TAB_PROPERTIES } from "src/utils/chrome";
import TabPropertyIcon from "./TabPropertyIcon";

Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/window/WindowView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useTabGroups,
useTabs,
useWindow,
} from "src/contexts/selectors";
} from "src/contexts";
import { filterSortTabs } from "src/utils/filterTabs";
import TabGroupView from "./TabGroupView";
import TabView from "./TabView";
Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/window/Windows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Grid from "@mui/material/Grid2";
import Stack from "@mui/material/Stack";
import { styled } from "@mui/material/styles";
import { useMemo } from "react";
import { useWindows } from "src/contexts/selectors";
import { useWindows } from "src/contexts";
import WindowLoading from "./WindowLoading";
import WindowView from "./WindowView";
import WindowsHeader, { Loading as HeaderLoading } from "./header/WindowsHeader";
Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/window/header/WindowsFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import Paper from "@mui/material/Paper";
import Popper from "@mui/material/Popper";
import Tooltip from "@mui/material/Tooltip";
import { MouseEvent, ReactNode, SyntheticEvent, useMemo, useRef, useState } from "react";
import { useAllTabs } from "src/contexts";
import { useFilterDispatch } from "src/contexts/DataProvider";
import { useAllTabs } from "src/contexts/selectors";
import { TAB_PROPERTIES } from "src/utils/chrome";
import { FILTER_TAB_PROPERTIES } from "src/utils/filterTabs";
import TabPropertyIcon, { getTabPropertyLabel } from "../TabPropertyIcon";
Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/window/header/WindowsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import Typography from "@mui/material/Typography";
import { useState } from "react";
import ElevationScroll from "src/components/ElevationScroll";
import Search from "src/components/layout/Search";
import { useIsFiltered, useTabCount, useWindowCount } from "src/contexts";
import { useFilterDispatch } from "src/contexts/DataProvider";
import { useIsFiltered, useTabCount, useWindowCount } from "src/contexts/selectors";
import WindowsBulkActions from "./actions/WindowsBulkActions";
import WindowsFilter from "./WindowsFilter";

Expand Down
2 changes: 1 addition & 1 deletion src/tabViews/window/header/actions/WindowsBulkActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import DeleteIcon from "@mui/icons-material/Delete";
import MergeTypeIcon from "@mui/icons-material/MergeType";
import Stack from "@mui/material/Stack";
import { MouseEventHandler, useMemo } from "react";
import { useAllTabs, useFilters, useSearch, useSelectedTabs } from "src/contexts/selectors";
import { useAllTabs, useFilters, useSearch, useSelectedTabs } from "src/contexts";
import { closeTabs, groupTabs, type TabIdType } from "src/utils/chrome";
import { filterTabs } from "src/utils/filterTabs";
import TooltipButton from "./TooltipButton";
Expand Down

0 comments on commit d6bee10

Please sign in to comment.