Skip to content

Commit 8ca63d9

Browse files
authored
Consolidate root Redux elements (#3054)
1 parent b75ccd0 commit 8ca63d9

File tree

109 files changed

+255
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+255
-219
lines changed

docs/style_guide/ts_style_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ function Component(props: { name: string }) {
540540
**Good**
541541

542542
```ts
543-
import { StoreState } from "types";
544-
import { useAppDispatch, useAppSelector } from "types/hooks";
543+
import { useAppDispatch, useAppSelector } from "rootRedux/hooks";
544+
import { type StoreState } from "rootRedux/types";
545545

546546
function Component(): ReactElement {
547547
const dispatch = useAppDispatch();

src/components/AnnouncementBanner/AnnouncementBanner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { BannerType } from "api/models";
1313
import { getBannerText } from "backend";
1414
import { getClosedBanner, setClosedBanner } from "backend/localStorage";
1515
import { topBarHeight } from "components/LandingPage/TopBar";
16-
import { StoreState } from "types";
17-
import { useAppSelector } from "types/hooks";
16+
import { useAppSelector } from "rootRedux/hooks";
17+
import { type StoreState } from "rootRedux/types";
1818
import { Path } from "types/path";
1919
import theme, { themeColors } from "types/theme";
2020

src/components/App/AppLoggedIn.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import Statistics from "components/Statistics/Statistics";
1515
import UserSettings from "components/UserSettings/UserSettings";
1616
import NextGoalScreen from "goals/DefaultGoal/NextGoalScreen";
1717
import { updateLangFromUser } from "i18n";
18-
import { StoreState } from "types";
19-
import { useAppSelector } from "types/hooks";
18+
import { useAppSelector } from "rootRedux/hooks";
19+
import { type StoreState } from "rootRedux/types";
2020
import { Path } from "types/path";
2121
import FontContext, { ProjectFonts } from "utilities/fontContext";
2222
import { getProjCss } from "utilities/fontCssUtilities";

src/components/App/SignalRHub.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import {
1818
success,
1919
} from "components/ProjectExport/Redux/ExportProjectActions";
2020
import { ExportStatus } from "components/ProjectExport/Redux/ExportProjectReduxTypes";
21-
import { StoreState } from "types";
22-
import { useAppDispatch, useAppSelector } from "types/hooks";
21+
import { useAppDispatch, useAppSelector } from "rootRedux/hooks";
22+
import { type StoreState } from "rootRedux/types";
2323

2424
/** A central hub for monitoring export status on SignalR */
2525
export default function SignalRHub(): ReactElement {

src/components/AppBar/NavigationButtons.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import {
1212
buttonMinHeight,
1313
tabColor,
1414
} from "components/AppBar/AppBarTypes";
15-
import { StoreState } from "types";
16-
import { useAppSelector } from "types/hooks";
15+
import { useAppSelector } from "rootRedux/hooks";
16+
import { type StoreState } from "rootRedux/types";
1717
import { Path } from "types/path";
1818
import { useWindowSize } from "utilities/useWindowSize";
1919

src/components/AppBar/ProjectButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
tabColor,
1515
} from "components/AppBar/AppBarTypes";
1616
import SpeakerMenu from "components/AppBar/SpeakerMenu";
17-
import { StoreState } from "types";
17+
import { type StoreState } from "rootRedux/types";
1818
import { GoalStatus, GoalType } from "types/goals";
1919
import { Path } from "types/path";
2020

src/components/AppBar/SpeakerMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import { type Speaker } from "api/models";
2323
import { getAllSpeakers } from "backend";
2424
import { buttonMinHeight } from "components/AppBar/AppBarTypes";
2525
import { setCurrentSpeaker } from "components/Project/ProjectActions";
26-
import { type StoreState } from "types";
27-
import { useAppDispatch } from "types/hooks";
26+
import { useAppDispatch } from "rootRedux/hooks";
27+
import { type StoreState } from "rootRedux/types";
2828
import { themeColors } from "types/theme";
2929

3030
const idAffix = "speaker-menu";

src/components/AppBar/UserMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
tabColor,
3333
} from "components/AppBar/AppBarTypes";
3434
import { clearCurrentProject } from "components/Project/ProjectActions";
35-
import { useAppDispatch } from "types/hooks";
35+
import { useAppDispatch } from "rootRedux/hooks";
3636
import { Path } from "types/path";
3737
import { RuntimeConfig } from "types/runtimeConfig";
3838
import { openUserGuide } from "utilities/pathUtilities";

src/components/AppBar/tests/SpeakerMenu.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import configureMockStore from "redux-mock-store";
77
import { Speaker } from "api/models";
88
import SpeakerMenu, { SpeakerMenuList } from "components/AppBar/SpeakerMenu";
99
import { defaultState } from "components/Project/ProjectReduxTypes";
10-
import { StoreState } from "types";
10+
import { type StoreState } from "rootRedux/types";
1111
import { randomSpeaker } from "types/project";
1212

1313
jest.mock("backend", () => ({

src/components/DataEntry/DataEntryTable/NewEntry/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
import SenseDialog from "components/DataEntry/DataEntryTable/NewEntry/SenseDialog";
2323
import VernDialog from "components/DataEntry/DataEntryTable/NewEntry/VernDialog";
2424
import PronunciationsFrontend from "components/Pronunciations/PronunciationsFrontend";
25-
import { StoreState } from "types";
25+
import { type StoreState } from "rootRedux/types";
2626
import theme from "types/theme";
2727
import { FileWithSpeakerId } from "types/word";
2828

0 commit comments

Comments
 (0)