From 8a7536d624bde5ebc52badbcae2113b561765f25 Mon Sep 17 00:00:00 2001 From: Horus Lugo Date: Mon, 23 Dec 2024 18:41:09 +0100 Subject: [PATCH] Replace @ alias with # package.json import --- apps/pwa/src/components/App.test.tsx | 2 +- apps/pwa/src/components/App.tsx | 14 ++++---- apps/pwa/src/components/about/About.test.tsx | 2 +- apps/pwa/src/components/about/About.tsx | 16 +++++----- apps/pwa/src/components/atom/Atom.tsx | 2 +- .../element-picker/ElementPicker.test.tsx | 2 +- .../element-picker/ElementPicker.tsx | 12 +++---- apps/pwa/src/components/hub/Hub.tsx | 28 ++++++++-------- .../src/components/hub/hub-item/HubItem.tsx | 2 +- apps/pwa/src/components/hub/useHub.ts | 4 +-- .../locale-selector/LocaleSelector.test.tsx | 2 +- .../locale-selector/LocaleSelector.tsx | 6 ++-- .../mass-calculator/AddElementModal.tsx | 4 +-- .../mass-calculator/CalculatorElement.tsx | 8 ++--- .../mass-calculator/EditElementModal.tsx | 8 ++--- .../mass-calculator/MassCalculator.test.tsx | 2 +- .../mass-calculator/MassCalculator.tsx | 12 +++---- .../hooks/useMassCalculator.ts | 2 +- .../PeriodicTablePage.test.tsx | 2 +- .../periodic-table-page/PeriodicTablePage.tsx | 20 ++++++------ .../element-info/ElementInfo.test.tsx | 6 ++-- .../element-info/ElementInfo.tsx | 8 ++--- .../periodic-table-test/PeriodicTableTest.tsx | 32 +++++++++---------- .../hooks/usePeriodicTableTestSettings.ts | 2 +- .../PeriodicTableTestSettings.test.tsx | 2 +- .../settings/PeriodicTableTestSettings.tsx | 16 +++++----- .../periodic-table/PeriodicTable.test.tsx | 6 ++-- .../periodic-table/PeriodicTable.tsx | 4 +-- .../pt-element/PtElementInfo.test.tsx | 6 ++-- .../components/pt-element/PtElementInfo.tsx | 6 ++-- .../pt-element/PtElementSetting.test.tsx | 6 ++-- .../pt-element/PtElementSetting.tsx | 8 ++--- .../pt-element/PtElementTest.test.tsx | 6 ++-- .../components/pt-element/PtElementTest.tsx | 6 ++-- .../questions-test/QuestionsTest.test.tsx | 2 +- .../question-card/QuestionCard.tsx | 4 +-- .../QuestionCardAnswer.tsx | 4 +-- .../components/quiz-results/QuizResults.tsx | 12 +++---- .../src/components/search-view/SearchView.tsx | 22 ++++++------- .../components/search-view/useSearchInput.ts | 2 +- .../components/shared/button/Button.test.tsx | 2 +- .../src/components/shared/button/Button.tsx | 2 +- apps/pwa/src/components/shared/card/Card.tsx | 2 +- .../shared/confirm/ConfirmContext.tsx | 10 +++--- .../shared/icon-button/IconButton.tsx | 6 ++-- apps/pwa/src/components/shared/icon/Icon.tsx | 2 +- .../ListItemSwipeAction.tsx | 4 +-- .../pwa/src/components/shared/modal/Modal.tsx | 8 ++--- .../components/shared/modal/modal.test.tsx | 2 +- .../components/shared/navbar/Navbar.test.tsx | 2 +- .../src/components/shared/navbar/Navbar.tsx | 6 ++-- .../shared/overlay/overlay.test.tsx | 2 +- .../selector-modal/SelectorModal.test.tsx | 2 +- .../shared/selector-modal/SelectorModal.tsx | 4 +-- .../src/components/shared/spinner/Spinner.tsx | 2 +- .../shared/swipeable-modal/SwipeableModal.tsx | 12 +++---- .../test-selection/TestSelection.test.tsx | 2 +- .../test-selection/TestSelection.tsx | 8 ++--- .../test-selection/test-entry/TestEntry.tsx | 10 +++--- .../theme-selector/ThemeSelector.test.tsx | 4 +-- .../theme-selector/ThemeSelector.tsx | 8 ++--- .../components/valences-test/ValencesTest.tsx | 30 ++++++++--------- .../hooks/useValencesTestSettings.ts | 2 +- .../settings/ValencesTestSettings.test.tsx | 2 +- .../settings/ValencesTestSettings.tsx | 16 +++++----- apps/pwa/src/constants.ts | 2 +- apps/pwa/src/contexts/ElementContext.tsx | 4 +-- .../pwa/src/contexts/ServiceWorkerContext.tsx | 2 +- apps/pwa/src/hooks/useContentSearch.ts | 2 +- apps/pwa/src/hooks/useElements.ts | 2 +- apps/pwa/src/hooks/useLocale.ts | 4 +-- apps/pwa/src/hooks/useRateApp.ts | 4 +-- apps/pwa/src/hooks/useSettings.ts | 2 +- apps/pwa/src/hooks/useTestSettings.ts | 2 +- apps/pwa/src/hooks/useTheme.ts | 2 +- apps/pwa/src/index.tsx | 4 +-- apps/pwa/src/layouts/MainLayout.tsx | 8 ++--- apps/pwa/src/screens/Home.tsx | 22 ++++++------- apps/pwa/src/services/flags.tsx | 2 +- .../src/services/locale/getBrowserLocale.ts | 2 +- apps/pwa/src/services/sentry.tsx | 2 +- apps/pwa/tsconfig.json | 1 - apps/pwa/vite.config.mts | 3 -- 83 files changed, 263 insertions(+), 267 deletions(-) diff --git a/apps/pwa/src/components/App.test.tsx b/apps/pwa/src/components/App.test.tsx index f6e1baf5..6973b521 100644 --- a/apps/pwa/src/components/App.test.tsx +++ b/apps/pwa/src/components/App.test.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import App from "./App"; import { Route, Routes } from "react-router-dom"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; test("It can render without crashing", () => { render( diff --git a/apps/pwa/src/components/App.tsx b/apps/pwa/src/components/App.tsx index 7f9e21ce..25f53a93 100644 --- a/apps/pwa/src/components/App.tsx +++ b/apps/pwa/src/components/App.tsx @@ -11,9 +11,9 @@ import { TEST_SELECTION, TEST_VALENCES, TEST_VALENCES_SETTINGS, -} from "@/routes"; -import { useLocale } from "@/hooks/useLocale"; -import { useTheme } from "@/hooks/useTheme"; +} from "#src/routes"; +import { useLocale } from "#src/hooks/useLocale"; +import { useTheme } from "#src/hooks/useTheme"; import About from "./about/About"; import MassCalculator from "./mass-calculator/MassCalculator"; import PeriodicTablePage, { @@ -25,12 +25,12 @@ import TestSelection from "./test-selection/TestSelection"; import ValencesTestSettings from "./valences-test/settings/ValencesTestSettings"; import ValencesTest from "./valences-test/ValencesTest"; import SearchView from "./search-view"; -import { ElementProvider } from "@/contexts/ElementContext"; +import { ElementProvider } from "#src/contexts/ElementContext"; import { createPack } from "react-component-pack"; import ConfirmProvider from "./shared/confirm"; -import { ServiceWorkerProvider } from "@/contexts/ServiceWorkerContext"; -import Home from "@/screens/Home"; -import MainLayout from "@/layouts/MainLayout"; +import { ServiceWorkerProvider } from "#src/contexts/ServiceWorkerContext"; +import Home from "#src/screens/Home"; +import MainLayout from "#src/layouts/MainLayout"; const ProviderPack = createPack( HelmetProvider as unknown as React.FunctionComponent<{ diff --git a/apps/pwa/src/components/about/About.test.tsx b/apps/pwa/src/components/about/About.test.tsx index 0afc4fc5..4b456d40 100644 --- a/apps/pwa/src/components/about/About.test.tsx +++ b/apps/pwa/src/components/about/About.test.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { screen } from "@testing-library/react"; import { userEvent } from "@testing-library/user-event"; import About from "./About"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; test.each([ { diff --git a/apps/pwa/src/components/about/About.tsx b/apps/pwa/src/components/about/About.tsx index 0aa47d3b..ab4f4812 100644 --- a/apps/pwa/src/components/about/About.tsx +++ b/apps/pwa/src/components/about/About.tsx @@ -1,13 +1,13 @@ import * as React from "react"; import { useNavigate } from "react-router-dom"; -import { useLocale } from "@/hooks/useLocale"; -import { HUB } from "@/routes"; -import LocaleSelector from "@/components/locale-selector/LocaleSelector"; -import Card from "@/components/shared/card/Card"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import Navbar from "@/components/shared/navbar/Navbar"; -import ThemeSelector from "@/components/theme-selector/ThemeSelector"; -import { FULL_VERSION } from "@/constants"; +import { useLocale } from "#src/hooks/useLocale"; +import { HUB } from "#src/routes"; +import LocaleSelector from "#src/components/locale-selector/LocaleSelector"; +import Card from "#src/components/shared/card/Card"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import Navbar from "#src/components/shared/navbar/Navbar"; +import ThemeSelector from "#src/components/theme-selector/ThemeSelector"; +import { FULL_VERSION } from "#src/constants"; function About() { const navigate = useNavigate(); diff --git a/apps/pwa/src/components/atom/Atom.tsx b/apps/pwa/src/components/atom/Atom.tsx index fc26d133..be28d7d5 100644 --- a/apps/pwa/src/components/atom/Atom.tsx +++ b/apps/pwa/src/components/atom/Atom.tsx @@ -1,4 +1,4 @@ -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; export type AtomColorVariant = "primary" | "white" | "black" | "inherit"; diff --git a/apps/pwa/src/components/element-picker/ElementPicker.test.tsx b/apps/pwa/src/components/element-picker/ElementPicker.test.tsx index bb982852..4096ae97 100644 --- a/apps/pwa/src/components/element-picker/ElementPicker.test.tsx +++ b/apps/pwa/src/components/element-picker/ElementPicker.test.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { screen } from "@testing-library/react"; import { userEvent } from "@testing-library/user-event"; import ElementPicker from "./ElementPicker"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; test("search for Neon", async () => { const onElement = vi.fn(); diff --git a/apps/pwa/src/components/element-picker/ElementPicker.tsx b/apps/pwa/src/components/element-picker/ElementPicker.tsx index 2ab50e97..781a54d9 100644 --- a/apps/pwa/src/components/element-picker/ElementPicker.tsx +++ b/apps/pwa/src/components/element-picker/ElementPicker.tsx @@ -1,11 +1,11 @@ import { useState, useRef, useEffect, useCallback } from "react"; import HyperScroller, { HyperScrollerCache } from "react-hyper-scroller"; -import { Element } from "@/Element"; -import { useElements } from "@/hooks/useElements"; -import { useLocale } from "@/hooks/useLocale"; -import Button from "@/components/shared/button/Button"; -import Icon from "@/components/shared/icon/Icon"; -import { cn } from "@/utils/styles"; +import { Element } from "#src/Element"; +import { useElements } from "#src/hooks/useElements"; +import { useLocale } from "#src/hooks/useLocale"; +import Button from "#src/components/shared/button/Button"; +import Icon from "#src/components/shared/icon/Icon"; +import { cn } from "#src/utils/styles"; interface ElementPickerProps { onElement: (element: Element) => void; diff --git a/apps/pwa/src/components/hub/Hub.tsx b/apps/pwa/src/components/hub/Hub.tsx index efbaa7ec..6e6e0374 100644 --- a/apps/pwa/src/components/hub/Hub.tsx +++ b/apps/pwa/src/components/hub/Hub.tsx @@ -1,19 +1,19 @@ -import { useServiceWorker } from "@/contexts/ServiceWorkerContext"; -import { useHubCategoryById } from "@/hooks/useHubCategories"; -import { useHubItemById } from "@/hooks/useHubItems"; -import { useLocale } from "@/hooks/useLocale"; -import { useRecent } from "@/hooks/useRecent"; -import { useTheme } from "@/hooks/useTheme"; -import { ABOUT } from "@/routes"; -import { useFlagStore } from "@/services/flags"; -import { logEvent } from "@/services/spycat"; +import { useServiceWorker } from "#src/contexts/ServiceWorkerContext"; +import { useHubCategoryById } from "#src/hooks/useHubCategories"; +import { useHubItemById } from "#src/hooks/useHubItems"; +import { useLocale } from "#src/hooks/useLocale"; +import { useRecent } from "#src/hooks/useRecent"; +import { useTheme } from "#src/hooks/useTheme"; +import { ABOUT } from "#src/routes"; +import { useFlagStore } from "#src/services/flags"; +import { logEvent } from "#src/services/spycat"; import * as React from "react"; import { useNavigate } from "react-router-dom"; -import Atom from "@/components/atom"; -import Button from "@/components/shared/button/Button"; -import { useConfirm } from "@/components/shared/confirm"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import Icon from "@/components/shared/icon/Icon"; +import Atom from "#src/components/atom"; +import Button from "#src/components/shared/button/Button"; +import { useConfirm } from "#src/components/shared/confirm"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import Icon from "#src/components/shared/icon/Icon"; import HubItem from "./hub-item"; import HubSection from "./hub-section"; import { HubSectionData, useHub } from "./useHub"; diff --git a/apps/pwa/src/components/hub/hub-item/HubItem.tsx b/apps/pwa/src/components/hub/hub-item/HubItem.tsx index afb4dcae..28628049 100644 --- a/apps/pwa/src/components/hub/hub-item/HubItem.tsx +++ b/apps/pwa/src/components/hub/hub-item/HubItem.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; export interface HubItemProps { colSpan?: 1 | 2; diff --git a/apps/pwa/src/components/hub/useHub.ts b/apps/pwa/src/components/hub/useHub.ts index 05ec6267..6a986199 100644 --- a/apps/pwa/src/components/hub/useHub.ts +++ b/apps/pwa/src/components/hub/useHub.ts @@ -1,5 +1,5 @@ -import hub from "@/data/hub/hub.json"; -import { useLocale } from "@/hooks/useLocale"; +import hub from "#src/data/hub/hub.json"; +import { useLocale } from "#src/hooks/useLocale"; import { useMemo } from "react"; export interface HubSectionData { diff --git a/apps/pwa/src/components/locale-selector/LocaleSelector.test.tsx b/apps/pwa/src/components/locale-selector/LocaleSelector.test.tsx index 2ea0103a..6233843c 100644 --- a/apps/pwa/src/components/locale-selector/LocaleSelector.test.tsx +++ b/apps/pwa/src/components/locale-selector/LocaleSelector.test.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render, waitMs } from "@/test-utils"; +import { render, waitMs } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; import LocaleSelector from "./LocaleSelector"; diff --git a/apps/pwa/src/components/locale-selector/LocaleSelector.tsx b/apps/pwa/src/components/locale-selector/LocaleSelector.tsx index 843698a5..950e03d9 100644 --- a/apps/pwa/src/components/locale-selector/LocaleSelector.tsx +++ b/apps/pwa/src/components/locale-selector/LocaleSelector.tsx @@ -1,9 +1,9 @@ import * as React from "react"; -import { useLocale, SUPPORTED_LOCALES } from "@/hooks/useLocale"; -import IconButton from "@/components/shared/icon-button/IconButton"; +import { useLocale, SUPPORTED_LOCALES } from "#src/hooks/useLocale"; +import IconButton from "#src/components/shared/icon-button/IconButton"; import SelectorModal, { SelectorModalOption, -} from "@/components/shared/selector-modal/SelectorModal"; +} from "#src/components/shared/selector-modal/SelectorModal"; function LocaleSelector() { const [selectorOpen, setSelectorOpen] = React.useState(false); diff --git a/apps/pwa/src/components/mass-calculator/AddElementModal.tsx b/apps/pwa/src/components/mass-calculator/AddElementModal.tsx index 09964da1..b385becf 100644 --- a/apps/pwa/src/components/mass-calculator/AddElementModal.tsx +++ b/apps/pwa/src/components/mass-calculator/AddElementModal.tsx @@ -1,5 +1,5 @@ -import Modal from "@/components/shared/modal/Modal"; -import ElementPicker from "@/components/element-picker/ElementPicker"; +import Modal from "#src/components/shared/modal/Modal"; +import ElementPicker from "#src/components/element-picker/ElementPicker"; interface AddElementModalProps { isOpen: boolean; diff --git a/apps/pwa/src/components/mass-calculator/CalculatorElement.tsx b/apps/pwa/src/components/mass-calculator/CalculatorElement.tsx index 884cf90b..8a4c00dc 100644 --- a/apps/pwa/src/components/mass-calculator/CalculatorElement.tsx +++ b/apps/pwa/src/components/mass-calculator/CalculatorElement.tsx @@ -1,8 +1,8 @@ import * as React from "react"; -import Button from "@/components/shared/button/Button"; -import { useLocale } from "@/hooks/useLocale"; -import { useElements } from "@/hooks/useElements"; -import { cn } from "@/utils/styles"; +import Button from "#src/components/shared/button/Button"; +import { useLocale } from "#src/hooks/useLocale"; +import { useElements } from "#src/hooks/useElements"; +import { cn } from "#src/utils/styles"; interface CalculatorElementProps { atomic: number; diff --git a/apps/pwa/src/components/mass-calculator/EditElementModal.tsx b/apps/pwa/src/components/mass-calculator/EditElementModal.tsx index 069326e1..bf8f9ea6 100644 --- a/apps/pwa/src/components/mass-calculator/EditElementModal.tsx +++ b/apps/pwa/src/components/mass-calculator/EditElementModal.tsx @@ -1,8 +1,8 @@ import * as React from "react"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import Modal from "@/components/shared/modal/Modal"; -import { useLocale } from "@/hooks/useLocale"; -import { useElements } from "@/hooks/useElements"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import Modal from "#src/components/shared/modal/Modal"; +import { useLocale } from "#src/hooks/useLocale"; +import { useElements } from "#src/hooks/useElements"; import { MassCalculatorElement } from "./hooks/useMassCalculator"; interface EditElementModalProps { diff --git a/apps/pwa/src/components/mass-calculator/MassCalculator.test.tsx b/apps/pwa/src/components/mass-calculator/MassCalculator.test.tsx index caa7e86e..d51c2b61 100644 --- a/apps/pwa/src/components/mass-calculator/MassCalculator.test.tsx +++ b/apps/pwa/src/components/mass-calculator/MassCalculator.test.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; import MassCalculator from "./MassCalculator"; import "hammerjs"; diff --git a/apps/pwa/src/components/mass-calculator/MassCalculator.tsx b/apps/pwa/src/components/mass-calculator/MassCalculator.tsx index 9838dda8..9ec40f54 100644 --- a/apps/pwa/src/components/mass-calculator/MassCalculator.tsx +++ b/apps/pwa/src/components/mass-calculator/MassCalculator.tsx @@ -1,15 +1,15 @@ import * as React from "react"; -import { useLocale } from "@/hooks/useLocale"; -import { HUB } from "@/routes"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import ListItemSwipeAction from "@/components/shared/list-item-swipe-action/ListItemSwipeAction"; -import Navbar from "@/components/shared/navbar/Navbar"; +import { useLocale } from "#src/hooks/useLocale"; +import { HUB } from "#src/routes"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import ListItemSwipeAction from "#src/components/shared/list-item-swipe-action/ListItemSwipeAction"; +import Navbar from "#src/components/shared/navbar/Navbar"; import AddElementModal from "./AddElementModal"; import EditElementModal from "./EditElementModal"; import CalculatorElement from "./CalculatorElement"; import { useMassCalculator } from "./hooks/useMassCalculator"; import { useModal } from "./hooks/useModal"; -import { useAddRecent } from "@/hooks/useRecent"; +import { useAddRecent } from "#src/hooks/useRecent"; import { useNavigate } from "react-router-dom"; function MassCalculator() { diff --git a/apps/pwa/src/components/mass-calculator/hooks/useMassCalculator.ts b/apps/pwa/src/components/mass-calculator/hooks/useMassCalculator.ts index 793c361f..2b37f557 100644 --- a/apps/pwa/src/components/mass-calculator/hooks/useMassCalculator.ts +++ b/apps/pwa/src/components/mass-calculator/hooks/useMassCalculator.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { useElements } from "@/hooks/useElements"; +import { useElements } from "#src/hooks/useElements"; export interface MassCalculatorElement { atomic: number; diff --git a/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.test.tsx b/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.test.tsx index 5af13567..63732127 100644 --- a/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.test.tsx +++ b/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.test.tsx @@ -3,7 +3,7 @@ import { screen } from "@testing-library/react"; import { userEvent } from "@testing-library/user-event"; import PeriodicTablePage from "./PeriodicTablePage"; import "hammerjs"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; test("should be able to navigate back to main menu", async () => { const { route } = render(, { diff --git a/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.tsx b/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.tsx index 1c19bb5c..0fd1cd9d 100644 --- a/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.tsx +++ b/apps/pwa/src/components/periodic-table-page/PeriodicTablePage.tsx @@ -1,16 +1,16 @@ import * as React from "react"; import { Outlet, useNavigate, useParams } from "react-router-dom"; -import { Element } from "@/Element"; -import { useElements } from "@/hooks/useElements"; -import { useLocale } from "@/hooks/useLocale"; -import { HUB, PERIODIC_TABLE } from "@/routes"; -import PeriodicTable from "@/components/periodic-table/PeriodicTable"; -import PtElementInfo from "@/components/pt-element/PtElementInfo"; -import Navbar from "@/components/shared/navbar/Navbar"; -import SwipeableModal from "@/components/shared/swipeable-modal/SwipeableModal"; +import { Element } from "#src/Element"; +import { useElements } from "#src/hooks/useElements"; +import { useLocale } from "#src/hooks/useLocale"; +import { HUB, PERIODIC_TABLE } from "#src/routes"; +import PeriodicTable from "#src/components/periodic-table/PeriodicTable"; +import PtElementInfo from "#src/components/pt-element/PtElementInfo"; +import Navbar from "#src/components/shared/navbar/Navbar"; +import SwipeableModal from "#src/components/shared/swipeable-modal/SwipeableModal"; import ElementInfo from "./element-info/ElementInfo"; -import { useAddRecent } from "@/hooks/useRecent"; -import { usePreventDocumentOverscroll } from "@/hooks/usePreventDocumentOverscroll"; +import { useAddRecent } from "#src/hooks/useRecent"; +import { usePreventDocumentOverscroll } from "#src/hooks/usePreventDocumentOverscroll"; function PeriodicTablePage() { const navigate = useNavigate(); diff --git a/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.test.tsx b/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.test.tsx index a59dcab4..5f40b1d5 100644 --- a/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.test.tsx +++ b/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.test.tsx @@ -1,9 +1,9 @@ import * as React from "react"; import ElementInfo from "./ElementInfo"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; -import THALLIUM_ELEMENT from "@/data/elements/81.json"; -import { Element } from "@/Element"; +import { render } from "#src/test-utils"; +import THALLIUM_ELEMENT from "#src/data/elements/81.json"; +import { Element } from "#src/Element"; const element = THALLIUM_ELEMENT as unknown as Element; diff --git a/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.tsx b/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.tsx index a3d3ec4d..b1e7b67c 100644 --- a/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.tsx +++ b/apps/pwa/src/components/periodic-table-page/element-info/ElementInfo.tsx @@ -1,7 +1,7 @@ -import { Element } from "@/Element"; -import { useElements } from "@/hooks/useElements"; -import { useLocale } from "@/hooks/useLocale"; -import { cn } from "@/utils/styles"; +import { Element } from "#src/Element"; +import { useElements } from "#src/hooks/useElements"; +import { useLocale } from "#src/hooks/useLocale"; +import { cn } from "#src/utils/styles"; interface ElementInfoDataEntryProps { name: string; diff --git a/apps/pwa/src/components/periodic-table-test/PeriodicTableTest.tsx b/apps/pwa/src/components/periodic-table-test/PeriodicTableTest.tsx index 5655bfed..a14f3e76 100644 --- a/apps/pwa/src/components/periodic-table-test/PeriodicTableTest.tsx +++ b/apps/pwa/src/components/periodic-table-test/PeriodicTableTest.tsx @@ -1,22 +1,22 @@ import * as React from "react"; import { useNavigate } from "react-router-dom"; -import { Element } from "@/Element"; -import { ElementsSettings } from "@/hooks/useSettings"; -import { useElements } from "@/hooks/useElements"; -import { useLocale } from "@/hooks/useLocale"; -import { TEST_PERIODIC_TABLE_SETTINGS, TEST_SELECTION } from "@/routes"; -import { shuffle } from "@/utils/shuffle"; -import PeriodicTable from "@/components/periodic-table/PeriodicTable"; -import PtElementTest from "@/components/pt-element/PtElementTest"; -import Card from "@/components/shared/card/Card"; -import Navbar from "@/components/shared/navbar/Navbar"; -import SwipeableModal from "@/components/shared/swipeable-modal/SwipeableModal"; -import QuizResults from "@/components/quiz-results/QuizResults"; +import { Element } from "#src/Element"; +import { ElementsSettings } from "#src/hooks/useSettings"; +import { useElements } from "#src/hooks/useElements"; +import { useLocale } from "#src/hooks/useLocale"; +import { TEST_PERIODIC_TABLE_SETTINGS, TEST_SELECTION } from "#src/routes"; +import { shuffle } from "#src/utils/shuffle"; +import PeriodicTable from "#src/components/periodic-table/PeriodicTable"; +import PtElementTest from "#src/components/pt-element/PtElementTest"; +import Card from "#src/components/shared/card/Card"; +import Navbar from "#src/components/shared/navbar/Navbar"; +import SwipeableModal from "#src/components/shared/swipeable-modal/SwipeableModal"; +import QuizResults from "#src/components/quiz-results/QuizResults"; import { usePeriodicTableTestSettings } from "./hooks/usePeriodicTableTestSettings"; -import { useAddRecent } from "@/hooks/useRecent"; -import { useConfirm } from "@/components/shared/confirm"; -import { usePreventDocumentOverscroll } from "@/hooks/usePreventDocumentOverscroll"; -import { cn } from "@/utils/styles"; +import { useAddRecent } from "#src/hooks/useRecent"; +import { useConfirm } from "#src/components/shared/confirm"; +import { usePreventDocumentOverscroll } from "#src/hooks/usePreventDocumentOverscroll"; +import { cn } from "#src/utils/styles"; interface PeriodicTableTestQuestion { element: Element; diff --git a/apps/pwa/src/components/periodic-table-test/hooks/usePeriodicTableTestSettings.ts b/apps/pwa/src/components/periodic-table-test/hooks/usePeriodicTableTestSettings.ts index 118e7777..d9073c2a 100644 --- a/apps/pwa/src/components/periodic-table-test/hooks/usePeriodicTableTestSettings.ts +++ b/apps/pwa/src/components/periodic-table-test/hooks/usePeriodicTableTestSettings.ts @@ -1,4 +1,4 @@ -import { useTestSettings } from "@/hooks/useTestSettings"; +import { useTestSettings } from "#src/hooks/useTestSettings"; import { useCallback } from "react"; export function usePeriodicTableTestSettings() { diff --git a/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.test.tsx b/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.test.tsx index b6a4a8fc..11a0cdb5 100644 --- a/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.test.tsx +++ b/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.test.tsx @@ -6,7 +6,7 @@ import { } from "@testing-library/react"; import { userEvent } from "@testing-library/user-event"; import PeriodicTableTestSettings from "./PeriodicTableTestSettings"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; window.scrollTo = vi.fn() as unknown as typeof window.scrollTo; diff --git a/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.tsx b/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.tsx index 35d0892c..5dc1cb05 100644 --- a/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.tsx +++ b/apps/pwa/src/components/periodic-table-test/settings/PeriodicTableTestSettings.tsx @@ -1,13 +1,13 @@ import * as React from "react"; import { useNavigate } from "react-router-dom"; -import { useLocale } from "@/hooks/useLocale"; -import { TEST_SELECTION } from "@/routes"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import Navbar from "@/components/shared/navbar/Navbar"; -import { usePeriodicTableTestSettings } from "@/components/periodic-table-test/hooks/usePeriodicTableTestSettings"; -import { useElements } from "@/hooks/useElements"; -import PtElementSetting from "@/components/pt-element/PtElementSetting"; -import PeriodicTable from "@/components/periodic-table/PeriodicTable"; +import { useLocale } from "#src/hooks/useLocale"; +import { TEST_SELECTION } from "#src/routes"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import Navbar from "#src/components/shared/navbar/Navbar"; +import { usePeriodicTableTestSettings } from "#src/components/periodic-table-test/hooks/usePeriodicTableTestSettings"; +import { useElements } from "#src/hooks/useElements"; +import PtElementSetting from "#src/components/pt-element/PtElementSetting"; +import PeriodicTable from "#src/components/periodic-table/PeriodicTable"; function PeriodicTableTestSettings() { const navigate = useNavigate(); diff --git a/apps/pwa/src/components/periodic-table/PeriodicTable.test.tsx b/apps/pwa/src/components/periodic-table/PeriodicTable.test.tsx index af41ba86..5c647ac8 100644 --- a/apps/pwa/src/components/periodic-table/PeriodicTable.test.tsx +++ b/apps/pwa/src/components/periodic-table/PeriodicTable.test.tsx @@ -1,9 +1,9 @@ import * as React from "react"; import PeriodicTable from "./PeriodicTable"; import { screen, waitForElementToBeRemoved } from "@testing-library/react"; -import PtElementInfo from "@/components/pt-element/PtElementInfo"; -import { Element } from "@/Element"; -import { render } from "@/test-utils"; +import PtElementInfo from "#src/components/pt-element/PtElementInfo"; +import { Element } from "#src/Element"; +import { render } from "#src/test-utils"; const elementsMap = import.meta.glob("../../data/elements/*.json", { eager: true, diff --git a/apps/pwa/src/components/periodic-table/PeriodicTable.tsx b/apps/pwa/src/components/periodic-table/PeriodicTable.tsx index d774a397..835664ac 100644 --- a/apps/pwa/src/components/periodic-table/PeriodicTable.tsx +++ b/apps/pwa/src/components/periodic-table/PeriodicTable.tsx @@ -1,8 +1,8 @@ import * as React from "react"; -import periodicTableData from "@/data/pt.json"; +import periodicTableData from "#src/data/pt.json"; import { TransformComponent, TransformWrapper } from "react-zoom-pan-pinch"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; type ElementRendered = (elementId: number) => React.ReactNode; interface PeriodicTableProps { diff --git a/apps/pwa/src/components/pt-element/PtElementInfo.test.tsx b/apps/pwa/src/components/pt-element/PtElementInfo.test.tsx index d17049af..a426e9b0 100644 --- a/apps/pwa/src/components/pt-element/PtElementInfo.test.tsx +++ b/apps/pwa/src/components/pt-element/PtElementInfo.test.tsx @@ -1,11 +1,11 @@ import * as React from "react"; import PtElementInfo from "./PtElementInfo"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; -import IRON_ELEMENT from "@/data/elements/26.json"; +import IRON_ELEMENT from "#src/data/elements/26.json"; -import { Element } from "@/Element"; +import { Element } from "#src/Element"; const element = IRON_ELEMENT as unknown as Element; diff --git a/apps/pwa/src/components/pt-element/PtElementInfo.tsx b/apps/pwa/src/components/pt-element/PtElementInfo.tsx index f380d94b..610d02b4 100644 --- a/apps/pwa/src/components/pt-element/PtElementInfo.tsx +++ b/apps/pwa/src/components/pt-element/PtElementInfo.tsx @@ -1,6 +1,6 @@ -import { Element } from "@/Element"; -import { useElements } from "@/hooks/useElements"; -import { cn } from "@/utils/styles"; +import { Element } from "#src/Element"; +import { useElements } from "#src/hooks/useElements"; +import { cn } from "#src/utils/styles"; export interface PtElementInfoProps { element: Element; diff --git a/apps/pwa/src/components/pt-element/PtElementSetting.test.tsx b/apps/pwa/src/components/pt-element/PtElementSetting.test.tsx index 6984222f..7dbf1304 100644 --- a/apps/pwa/src/components/pt-element/PtElementSetting.test.tsx +++ b/apps/pwa/src/components/pt-element/PtElementSetting.test.tsx @@ -1,11 +1,11 @@ import * as React from "react"; import PtElementSetting from "./PtElementSetting"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; -import IRON_ELEMENT from "@/data/elements/26.json"; +import IRON_ELEMENT from "#src/data/elements/26.json"; -import { Element } from "@/Element"; +import { Element } from "#src/Element"; const element = IRON_ELEMENT as unknown as Element; diff --git a/apps/pwa/src/components/pt-element/PtElementSetting.tsx b/apps/pwa/src/components/pt-element/PtElementSetting.tsx index 22093709..4fe4855b 100644 --- a/apps/pwa/src/components/pt-element/PtElementSetting.tsx +++ b/apps/pwa/src/components/pt-element/PtElementSetting.tsx @@ -1,7 +1,7 @@ -import { Element } from "@/Element"; -import { useElements } from "@/hooks/useElements"; -import { useLocale } from "@/hooks/useLocale"; -import { cn } from "@/utils/styles"; +import { Element } from "#src/Element"; +import { useElements } from "#src/hooks/useElements"; +import { useLocale } from "#src/hooks/useLocale"; +import { cn } from "#src/utils/styles"; export interface PtElementSettingProp { element: Element; diff --git a/apps/pwa/src/components/pt-element/PtElementTest.test.tsx b/apps/pwa/src/components/pt-element/PtElementTest.test.tsx index 024470d3..65acf319 100644 --- a/apps/pwa/src/components/pt-element/PtElementTest.test.tsx +++ b/apps/pwa/src/components/pt-element/PtElementTest.test.tsx @@ -1,9 +1,9 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import PtElementTest from "./PtElementTest"; -import IRON_ELEMENT from "@/data/elements/26.json"; -import { Element } from "@/Element"; +import IRON_ELEMENT from "#src/data/elements/26.json"; +import { Element } from "#src/Element"; const element = IRON_ELEMENT as unknown as Element; diff --git a/apps/pwa/src/components/pt-element/PtElementTest.tsx b/apps/pwa/src/components/pt-element/PtElementTest.tsx index a2e077ba..b4425fdb 100644 --- a/apps/pwa/src/components/pt-element/PtElementTest.tsx +++ b/apps/pwa/src/components/pt-element/PtElementTest.tsx @@ -1,8 +1,8 @@ import * as React from "react"; -import { useElements } from "@/hooks/useElements"; -import Icon from "@/components/shared/icon/Icon"; +import { useElements } from "#src/hooks/useElements"; +import Icon from "#src/components/shared/icon/Icon"; import { PtElementInfoProps } from "./PtElementInfo"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; export interface PtElementTestProps extends PtElementInfoProps { discovered: boolean; diff --git a/apps/pwa/src/components/questions-test/QuestionsTest.test.tsx b/apps/pwa/src/components/questions-test/QuestionsTest.test.tsx index c3fa7896..efc6bc99 100644 --- a/apps/pwa/src/components/questions-test/QuestionsTest.test.tsx +++ b/apps/pwa/src/components/questions-test/QuestionsTest.test.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import QuestionsTest from "./QuestionsTest"; diff --git a/apps/pwa/src/components/questions-test/question-card/QuestionCard.tsx b/apps/pwa/src/components/questions-test/question-card/QuestionCard.tsx index 9f0c0c39..667db455 100644 --- a/apps/pwa/src/components/questions-test/question-card/QuestionCard.tsx +++ b/apps/pwa/src/components/questions-test/question-card/QuestionCard.tsx @@ -1,9 +1,9 @@ import * as React from "react"; -import Card from "@/components/shared/card/Card"; +import Card from "#src/components/shared/card/Card"; import QuestionCardAnswer, { Answer, } from "./question-card-answer/QuestionCardAnswer"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; export interface Question { question: string; diff --git a/apps/pwa/src/components/questions-test/question-card/question-card-answer/QuestionCardAnswer.tsx b/apps/pwa/src/components/questions-test/question-card/question-card-answer/QuestionCardAnswer.tsx index a8aa5cce..77a4aa3a 100644 --- a/apps/pwa/src/components/questions-test/question-card/question-card-answer/QuestionCardAnswer.tsx +++ b/apps/pwa/src/components/questions-test/question-card/question-card-answer/QuestionCardAnswer.tsx @@ -1,7 +1,7 @@ import * as React from "react"; -import Button, { ButtonProps } from "@/components/shared/button/Button"; +import Button, { ButtonProps } from "#src/components/shared/button/Button"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; export interface Answer { answer: string; diff --git a/apps/pwa/src/components/quiz-results/QuizResults.tsx b/apps/pwa/src/components/quiz-results/QuizResults.tsx index b7b1f453..1c8bcde1 100644 --- a/apps/pwa/src/components/quiz-results/QuizResults.tsx +++ b/apps/pwa/src/components/quiz-results/QuizResults.tsx @@ -1,10 +1,10 @@ -import { logEvent } from "@/services/spycat"; +import { logEvent } from "#src/services/spycat"; import * as React from "react"; -import { useLocale } from "@/hooks/useLocale"; -import { useRateApp } from "@/hooks/useRateApp"; -import { cn } from "@/utils/styles"; -import Button from "@/components/shared/button/Button"; -import Icon from "@/components/shared/icon/Icon"; +import { useLocale } from "#src/hooks/useLocale"; +import { useRateApp } from "#src/hooks/useRateApp"; +import { cn } from "#src/utils/styles"; +import Button from "#src/components/shared/button/Button"; +import Icon from "#src/components/shared/icon/Icon"; export interface TestResultsProps { gaTestName: string; diff --git a/apps/pwa/src/components/search-view/SearchView.tsx b/apps/pwa/src/components/search-view/SearchView.tsx index 937a3458..a4b26e85 100644 --- a/apps/pwa/src/components/search-view/SearchView.tsx +++ b/apps/pwa/src/components/search-view/SearchView.tsx @@ -1,19 +1,19 @@ import { useSearchInput } from "./useSearchInput"; import * as React from "react"; import FocusTrap from "focus-trap-react"; -import Button from "@/components/shared/button/Button"; -import Portal from "@/components/shared/portal/Portal"; -import { useLocale } from "@/hooks/useLocale"; -import { useLockBodyScroll } from "@/hooks/useLockBodyScroll"; -import Icon from "@/components/shared/icon/Icon"; -import { useContentSearch, SearchResult } from "@/hooks/useContentSearch"; -import { useElements } from "@/hooks/useElements"; -import { Element } from "@/Element"; -import Atom from "@/components/atom"; -import { PERIODIC_TABLE } from "@/routes"; +import Button from "#src/components/shared/button/Button"; +import Portal from "#src/components/shared/portal/Portal"; +import { useLocale } from "#src/hooks/useLocale"; +import { useLockBodyScroll } from "#src/hooks/useLockBodyScroll"; +import Icon from "#src/components/shared/icon/Icon"; +import { useContentSearch, SearchResult } from "#src/hooks/useContentSearch"; +import { useElements } from "#src/hooks/useElements"; +import { Element } from "#src/Element"; +import Atom from "#src/components/atom"; +import { PERIODIC_TABLE } from "#src/routes"; import NoResults from "./no-results.svg?react"; import { useNavigate } from "react-router-dom"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; function SearchView() { const { i18n } = useLocale(); diff --git a/apps/pwa/src/components/search-view/useSearchInput.ts b/apps/pwa/src/components/search-view/useSearchInput.ts index 2d70a101..08a6a35e 100644 --- a/apps/pwa/src/components/search-view/useSearchInput.ts +++ b/apps/pwa/src/components/search-view/useSearchInput.ts @@ -1,6 +1,6 @@ import * as React from "react"; import { useNavigate, useSearchParams } from "react-router-dom"; -import { useLocale } from "@/hooks/useLocale"; +import { useLocale } from "#src/hooks/useLocale"; export function useSearchInput(type: "push" | "replace") { const { i18n } = useLocale(); diff --git a/apps/pwa/src/components/shared/button/Button.test.tsx b/apps/pwa/src/components/shared/button/Button.test.tsx index d634d5c6..d4262adf 100644 --- a/apps/pwa/src/components/shared/button/Button.test.tsx +++ b/apps/pwa/src/components/shared/button/Button.test.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import Button from "./Button"; import { userEvent } from "@testing-library/user-event"; diff --git a/apps/pwa/src/components/shared/button/Button.tsx b/apps/pwa/src/components/shared/button/Button.tsx index 5c517e7d..066379d3 100644 --- a/apps/pwa/src/components/shared/button/Button.tsx +++ b/apps/pwa/src/components/shared/button/Button.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; export interface ButtonProps { className?: string; diff --git a/apps/pwa/src/components/shared/card/Card.tsx b/apps/pwa/src/components/shared/card/Card.tsx index eaa9bef1..e8bad747 100644 --- a/apps/pwa/src/components/shared/card/Card.tsx +++ b/apps/pwa/src/components/shared/card/Card.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; interface CardProps { className?: string; diff --git a/apps/pwa/src/components/shared/confirm/ConfirmContext.tsx b/apps/pwa/src/components/shared/confirm/ConfirmContext.tsx index e6aa79cc..96eb693f 100644 --- a/apps/pwa/src/components/shared/confirm/ConfirmContext.tsx +++ b/apps/pwa/src/components/shared/confirm/ConfirmContext.tsx @@ -1,9 +1,9 @@ import * as React from "react"; -import Button from "@/components/shared/button/Button"; -import { useUnmounted } from "@/hooks/useUnmounted"; -import SwipeableModal from "@/components/shared/swipeable-modal/SwipeableModal"; -import Icon from "@/components/shared/icon/Icon"; -import { useLocale } from "@/hooks/useLocale"; +import Button from "#src/components/shared/button/Button"; +import { useUnmounted } from "#src/hooks/useUnmounted"; +import SwipeableModal from "#src/components/shared/swipeable-modal/SwipeableModal"; +import Icon from "#src/components/shared/icon/Icon"; +import { useLocale } from "#src/hooks/useLocale"; export interface ConfirmAction { title: string; diff --git a/apps/pwa/src/components/shared/icon-button/IconButton.tsx b/apps/pwa/src/components/shared/icon-button/IconButton.tsx index e9286222..54fda5e7 100644 --- a/apps/pwa/src/components/shared/icon-button/IconButton.tsx +++ b/apps/pwa/src/components/shared/icon-button/IconButton.tsx @@ -1,6 +1,6 @@ -import Button, { ButtonProps } from "@/components/shared/button/Button"; -import Icon from "@/components/shared/icon/Icon"; -import { cn } from "@/utils/styles"; +import Button, { ButtonProps } from "#src/components/shared/button/Button"; +import Icon from "#src/components/shared/icon/Icon"; +import { cn } from "#src/utils/styles"; interface IconButtonProps extends Omit { iconName: string; diff --git a/apps/pwa/src/components/shared/icon/Icon.tsx b/apps/pwa/src/components/shared/icon/Icon.tsx index 85651896..5df67e21 100644 --- a/apps/pwa/src/components/shared/icon/Icon.tsx +++ b/apps/pwa/src/components/shared/icon/Icon.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import invariant from "invariant"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; const iconMap = import.meta.glob< true, diff --git a/apps/pwa/src/components/shared/list-item-swipe-action/ListItemSwipeAction.tsx b/apps/pwa/src/components/shared/list-item-swipe-action/ListItemSwipeAction.tsx index fe4c5dad..e0f1a44c 100644 --- a/apps/pwa/src/components/shared/list-item-swipe-action/ListItemSwipeAction.tsx +++ b/apps/pwa/src/components/shared/list-item-swipe-action/ListItemSwipeAction.tsx @@ -1,8 +1,8 @@ import * as React from "react"; import anime from "animejs"; -import useLatestRef from "@/hooks/useLatestRef"; +import useLatestRef from "#src/hooks/useLatestRef"; -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; interface ListItemSwipeActionProps { onAction?: () => void; diff --git a/apps/pwa/src/components/shared/modal/Modal.tsx b/apps/pwa/src/components/shared/modal/Modal.tsx index 9dc32938..404608ee 100644 --- a/apps/pwa/src/components/shared/modal/Modal.tsx +++ b/apps/pwa/src/components/shared/modal/Modal.tsx @@ -1,8 +1,8 @@ import { useEffect, ReactNode } from "react"; -import Portal from "@/components/shared/portal/Portal"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import Overlay from "@/components/shared/overlay/Overlay"; -import { cn } from "@/utils/styles"; +import Portal from "#src/components/shared/portal/Portal"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import Overlay from "#src/components/shared/overlay/Overlay"; +import { cn } from "#src/utils/styles"; export interface ModalProps { open: boolean; diff --git a/apps/pwa/src/components/shared/modal/modal.test.tsx b/apps/pwa/src/components/shared/modal/modal.test.tsx index 005aed64..5eb3b6c8 100644 --- a/apps/pwa/src/components/shared/modal/modal.test.tsx +++ b/apps/pwa/src/components/shared/modal/modal.test.tsx @@ -1,5 +1,5 @@ import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; import Modal from "./Modal"; diff --git a/apps/pwa/src/components/shared/navbar/Navbar.test.tsx b/apps/pwa/src/components/shared/navbar/Navbar.test.tsx index 2617680f..76fd20eb 100644 --- a/apps/pwa/src/components/shared/navbar/Navbar.test.tsx +++ b/apps/pwa/src/components/shared/navbar/Navbar.test.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; import Navbar from "./Navbar"; diff --git a/apps/pwa/src/components/shared/navbar/Navbar.tsx b/apps/pwa/src/components/shared/navbar/Navbar.tsx index 43a0cceb..664a329e 100644 --- a/apps/pwa/src/components/shared/navbar/Navbar.tsx +++ b/apps/pwa/src/components/shared/navbar/Navbar.tsx @@ -1,6 +1,6 @@ -import { useLocale } from "@/hooks/useLocale"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import { cn } from "@/utils/styles"; +import { useLocale } from "#src/hooks/useLocale"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import { cn } from "#src/utils/styles"; interface NavbarProps { title?: string; diff --git a/apps/pwa/src/components/shared/overlay/overlay.test.tsx b/apps/pwa/src/components/shared/overlay/overlay.test.tsx index a671c948..1f23981d 100644 --- a/apps/pwa/src/components/shared/overlay/overlay.test.tsx +++ b/apps/pwa/src/components/shared/overlay/overlay.test.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; import Overlay from "./Overlay"; diff --git a/apps/pwa/src/components/shared/selector-modal/SelectorModal.test.tsx b/apps/pwa/src/components/shared/selector-modal/SelectorModal.test.tsx index 7394a100..81d6ccbe 100644 --- a/apps/pwa/src/components/shared/selector-modal/SelectorModal.test.tsx +++ b/apps/pwa/src/components/shared/selector-modal/SelectorModal.test.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import SelectorModal, { SelectorModalOption } from "./SelectorModal"; import { userEvent } from "@testing-library/user-event"; diff --git a/apps/pwa/src/components/shared/selector-modal/SelectorModal.tsx b/apps/pwa/src/components/shared/selector-modal/SelectorModal.tsx index 6e31bd3f..e5c9359e 100644 --- a/apps/pwa/src/components/shared/selector-modal/SelectorModal.tsx +++ b/apps/pwa/src/components/shared/selector-modal/SelectorModal.tsx @@ -1,5 +1,5 @@ -import Button from "@/components/shared/button/Button"; -import Modal, { ModalProps } from "@/components/shared/modal/Modal"; +import Button from "#src/components/shared/button/Button"; +import Modal, { ModalProps } from "#src/components/shared/modal/Modal"; export interface SelectorModalOption { key: string; diff --git a/apps/pwa/src/components/shared/spinner/Spinner.tsx b/apps/pwa/src/components/shared/spinner/Spinner.tsx index a60d848d..245cb578 100644 --- a/apps/pwa/src/components/shared/spinner/Spinner.tsx +++ b/apps/pwa/src/components/shared/spinner/Spinner.tsx @@ -1,4 +1,4 @@ -import { cn } from "@/utils/styles"; +import { cn } from "#src/utils/styles"; interface SpinnerProps { className?: string; diff --git a/apps/pwa/src/components/shared/swipeable-modal/SwipeableModal.tsx b/apps/pwa/src/components/shared/swipeable-modal/SwipeableModal.tsx index 0092d246..4ea4344d 100644 --- a/apps/pwa/src/components/shared/swipeable-modal/SwipeableModal.tsx +++ b/apps/pwa/src/components/shared/swipeable-modal/SwipeableModal.tsx @@ -1,11 +1,11 @@ import anime from "animejs"; import * as React from "react"; -import Portal from "@/components/shared/portal/Portal"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import { ModalProps } from "@/components/shared/modal/Modal"; -import Overlay from "@/components/shared/overlay/Overlay"; -import { useLocale } from "@/hooks/useLocale"; -import { cn } from "@/utils/styles"; +import Portal from "#src/components/shared/portal/Portal"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import { ModalProps } from "#src/components/shared/modal/Modal"; +import Overlay from "#src/components/shared/overlay/Overlay"; +import { useLocale } from "#src/hooks/useLocale"; +import { cn } from "#src/utils/styles"; type ModalContentProps = Omit; diff --git a/apps/pwa/src/components/test-selection/TestSelection.test.tsx b/apps/pwa/src/components/test-selection/TestSelection.test.tsx index 18660df3..97277e9a 100644 --- a/apps/pwa/src/components/test-selection/TestSelection.test.tsx +++ b/apps/pwa/src/components/test-selection/TestSelection.test.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; import TestSelection from "./TestSelection"; diff --git a/apps/pwa/src/components/test-selection/TestSelection.tsx b/apps/pwa/src/components/test-selection/TestSelection.tsx index b56024bd..b34f3925 100644 --- a/apps/pwa/src/components/test-selection/TestSelection.tsx +++ b/apps/pwa/src/components/test-selection/TestSelection.tsx @@ -1,10 +1,10 @@ import * as React from "react"; import { useNavigate } from "react-router-dom"; -import { useLocale } from "@/hooks/useLocale"; -import { HUB } from "@/routes"; -import Navbar from "@/components/shared/navbar/Navbar"; +import { useLocale } from "#src/hooks/useLocale"; +import { HUB } from "#src/routes"; +import Navbar from "#src/components/shared/navbar/Navbar"; import TestEntry from "./test-entry/TestEntry"; -import { useAddRecent } from "@/hooks/useRecent"; +import { useAddRecent } from "#src/hooks/useRecent"; function TestSelection() { const { i18n } = useLocale(); diff --git a/apps/pwa/src/components/test-selection/test-entry/TestEntry.tsx b/apps/pwa/src/components/test-selection/test-entry/TestEntry.tsx index 9148565f..13382e51 100644 --- a/apps/pwa/src/components/test-selection/test-entry/TestEntry.tsx +++ b/apps/pwa/src/components/test-selection/test-entry/TestEntry.tsx @@ -1,9 +1,9 @@ import * as React from "react"; -import { useLocale } from "@/hooks/useLocale"; -import Button from "@/components/shared/button/Button"; -import Card from "@/components/shared/card/Card"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import Icon from "@/components/shared/icon/Icon"; +import { useLocale } from "#src/hooks/useLocale"; +import Button from "#src/components/shared/button/Button"; +import Card from "#src/components/shared/card/Card"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import Icon from "#src/components/shared/icon/Icon"; interface TestEntryProps { title: string; diff --git a/apps/pwa/src/components/theme-selector/ThemeSelector.test.tsx b/apps/pwa/src/components/theme-selector/ThemeSelector.test.tsx index 769a08c9..a12029c9 100644 --- a/apps/pwa/src/components/theme-selector/ThemeSelector.test.tsx +++ b/apps/pwa/src/components/theme-selector/ThemeSelector.test.tsx @@ -1,8 +1,8 @@ import * as React from "react"; import { screen } from "@testing-library/react"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; import { userEvent } from "@testing-library/user-event"; -import { STORAGE_KEY } from "@/hooks/useSettings"; +import { STORAGE_KEY } from "#src/hooks/useSettings"; import ThemeSelector from "./ThemeSelector"; afterEach(() => { diff --git a/apps/pwa/src/components/theme-selector/ThemeSelector.tsx b/apps/pwa/src/components/theme-selector/ThemeSelector.tsx index 4c980a19..7384b726 100644 --- a/apps/pwa/src/components/theme-selector/ThemeSelector.tsx +++ b/apps/pwa/src/components/theme-selector/ThemeSelector.tsx @@ -1,10 +1,10 @@ import * as React from "react"; -import { useLocale } from "@/hooks/useLocale"; -import { useTheme, THEMES_LIST } from "@/hooks/useTheme"; -import IconButton from "@/components/shared/icon-button/IconButton"; +import { useLocale } from "#src/hooks/useLocale"; +import { useTheme, THEMES_LIST } from "#src/hooks/useTheme"; +import IconButton from "#src/components/shared/icon-button/IconButton"; import SelectorModal, { SelectorModalOption, -} from "@/components/shared/selector-modal/SelectorModal"; +} from "#src/components/shared/selector-modal/SelectorModal"; function ThemeSelector() { const { i18n } = useLocale(); diff --git a/apps/pwa/src/components/valences-test/ValencesTest.tsx b/apps/pwa/src/components/valences-test/ValencesTest.tsx index 0e8ee163..8d4a95c1 100644 --- a/apps/pwa/src/components/valences-test/ValencesTest.tsx +++ b/apps/pwa/src/components/valences-test/ValencesTest.tsx @@ -1,21 +1,21 @@ import * as React from "react"; import { useNavigate } from "react-router-dom"; -import { Element } from "@/Element"; -import { ElementsSettings } from "@/hooks/useSettings"; -import { useElements } from "@/hooks/useElements"; -import { useLocale } from "@/hooks/useLocale"; -import { TEST_SELECTION, TEST_VALENCES_SETTINGS } from "@/routes"; -import { shuffle } from "@/utils/shuffle"; -import { Answer } from "@/components/questions-test/question-card/question-card-answer/QuestionCardAnswer"; -import { Question } from "@/components/questions-test/question-card/QuestionCard"; -import QuestionsTest from "@/components/questions-test/QuestionsTest"; -import Card from "@/components/shared/card/Card"; -import Navbar from "@/components/shared/navbar/Navbar"; -import QuizResults from "@/components/quiz-results/QuizResults"; +import { Element } from "#src/Element"; +import { ElementsSettings } from "#src/hooks/useSettings"; +import { useElements } from "#src/hooks/useElements"; +import { useLocale } from "#src/hooks/useLocale"; +import { TEST_SELECTION, TEST_VALENCES_SETTINGS } from "#src/routes"; +import { shuffle } from "#src/utils/shuffle"; +import { Answer } from "#src/components/questions-test/question-card/question-card-answer/QuestionCardAnswer"; +import { Question } from "#src/components/questions-test/question-card/QuestionCard"; +import QuestionsTest from "#src/components/questions-test/QuestionsTest"; +import Card from "#src/components/shared/card/Card"; +import Navbar from "#src/components/shared/navbar/Navbar"; +import QuizResults from "#src/components/quiz-results/QuizResults"; import { useValencesTestSettings } from "./hooks/useValencesTestSettings"; -import { useAddRecent } from "@/hooks/useRecent"; -import { useConfirm } from "@/components/shared/confirm"; -import { usePreventDocumentOverscroll } from "@/hooks/usePreventDocumentOverscroll"; +import { useAddRecent } from "#src/hooks/useRecent"; +import { useConfirm } from "#src/components/shared/confirm"; +import { usePreventDocumentOverscroll } from "#src/hooks/usePreventDocumentOverscroll"; interface ValencesTestQuestion extends Question { data: Element; diff --git a/apps/pwa/src/components/valences-test/hooks/useValencesTestSettings.ts b/apps/pwa/src/components/valences-test/hooks/useValencesTestSettings.ts index bc8e6168..40312e2d 100644 --- a/apps/pwa/src/components/valences-test/hooks/useValencesTestSettings.ts +++ b/apps/pwa/src/components/valences-test/hooks/useValencesTestSettings.ts @@ -1,4 +1,4 @@ -import { useTestSettings } from "@/hooks/useTestSettings"; +import { useTestSettings } from "#src/hooks/useTestSettings"; import { useCallback } from "react"; export function useValencesTestSettings() { diff --git a/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.test.tsx b/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.test.tsx index 1e1dd67a..dd32e799 100644 --- a/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.test.tsx +++ b/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.test.tsx @@ -6,7 +6,7 @@ import { } from "@testing-library/react"; import { userEvent } from "@testing-library/user-event"; import ValencesTestSettings from "./ValencesTestSettings"; -import { render } from "@/test-utils"; +import { render } from "#src/test-utils"; window.scrollTo = vi.fn() as unknown as typeof window.scrollTo; diff --git a/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.tsx b/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.tsx index 66fc85ee..16976a2a 100644 --- a/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.tsx +++ b/apps/pwa/src/components/valences-test/settings/ValencesTestSettings.tsx @@ -1,13 +1,13 @@ import * as React from "react"; import { useNavigate } from "react-router-dom"; -import { useLocale } from "@/hooks/useLocale"; -import { TEST_SELECTION } from "@/routes"; -import IconButton from "@/components/shared/icon-button/IconButton"; -import Navbar from "@/components/shared/navbar/Navbar"; -import { useValencesTestSettings } from "@/components/valences-test/hooks/useValencesTestSettings"; -import PeriodicTable from "@/components/periodic-table/PeriodicTable"; -import { useElements } from "@/hooks/useElements"; -import PtElementSetting from "@/components/pt-element/PtElementSetting"; +import { useLocale } from "#src/hooks/useLocale"; +import { TEST_SELECTION } from "#src/routes"; +import IconButton from "#src/components/shared/icon-button/IconButton"; +import Navbar from "#src/components/shared/navbar/Navbar"; +import { useValencesTestSettings } from "#src/components/valences-test/hooks/useValencesTestSettings"; +import PeriodicTable from "#src/components/periodic-table/PeriodicTable"; +import { useElements } from "#src/hooks/useElements"; +import PtElementSetting from "#src/components/pt-element/PtElementSetting"; function ValencesTestSettings() { const navigate = useNavigate(); diff --git a/apps/pwa/src/constants.ts b/apps/pwa/src/constants.ts index 17454661..6172af2e 100644 --- a/apps/pwa/src/constants.ts +++ b/apps/pwa/src/constants.ts @@ -1,4 +1,4 @@ -import packageJson from "@/../package.json"; +import packageJson from "#package.json"; export const IS_DEVELOPMENT = import.meta.env.DEV; diff --git a/apps/pwa/src/contexts/ElementContext.tsx b/apps/pwa/src/contexts/ElementContext.tsx index ec248e7d..6e388913 100644 --- a/apps/pwa/src/contexts/ElementContext.tsx +++ b/apps/pwa/src/contexts/ElementContext.tsx @@ -1,6 +1,6 @@ import MiniSearch, { SearchOptions } from "minisearch"; -import { Element } from "@/Element"; -import { useLocale } from "@/hooks/useLocale"; +import { Element } from "#src/Element"; +import { useLocale } from "#src/hooks/useLocale"; import * as React from "react"; const elementsMap = import.meta.glob("../data/elements/*.json", { diff --git a/apps/pwa/src/contexts/ServiceWorkerContext.tsx b/apps/pwa/src/contexts/ServiceWorkerContext.tsx index e5adbcb2..c63257db 100644 --- a/apps/pwa/src/contexts/ServiceWorkerContext.tsx +++ b/apps/pwa/src/contexts/ServiceWorkerContext.tsx @@ -1,4 +1,4 @@ -import { useUnmounted } from "@/hooks/useUnmounted"; +import { useUnmounted } from "#src/hooks/useUnmounted"; import * as React from "react"; interface ServiceWorkerContextType { diff --git a/apps/pwa/src/hooks/useContentSearch.ts b/apps/pwa/src/hooks/useContentSearch.ts index f3ce1ac0..6eca7538 100644 --- a/apps/pwa/src/hooks/useContentSearch.ts +++ b/apps/pwa/src/hooks/useContentSearch.ts @@ -1,4 +1,4 @@ -import { logEvent } from "@/services/spycat"; +import { logEvent } from "#src/services/spycat"; import { SearchResult as MiniSearchResult } from "minisearch"; import { useEffect, useMemo } from "react"; import { useElements } from "./useElements"; diff --git a/apps/pwa/src/hooks/useElements.ts b/apps/pwa/src/hooks/useElements.ts index 4439ceb0..e57b19df 100644 --- a/apps/pwa/src/hooks/useElements.ts +++ b/apps/pwa/src/hooks/useElements.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { ElementContext } from "@/contexts/ElementContext"; +import { ElementContext } from "#src/contexts/ElementContext"; export function useElements() { return React.useContext(ElementContext); diff --git a/apps/pwa/src/hooks/useLocale.ts b/apps/pwa/src/hooks/useLocale.ts index 82439555..bf5be5b6 100644 --- a/apps/pwa/src/hooks/useLocale.ts +++ b/apps/pwa/src/hooks/useLocale.ts @@ -1,8 +1,8 @@ import { useCallback, useMemo } from "react"; import invariant from "invariant"; -import localePercentages from "@/locales/percentages.json"; +import localePercentages from "#src/locales/percentages.json"; import { useSettings } from "./useSettings"; -import { DEFAULT_LOCALE } from "@/services/locale/defaultLocale"; +import { DEFAULT_LOCALE } from "#src/services/locale/defaultLocale"; export const SUPPORTED_LOCALES = Object.entries(localePercentages) .filter(([, percentage]) => percentage >= 85) diff --git a/apps/pwa/src/hooks/useRateApp.ts b/apps/pwa/src/hooks/useRateApp.ts index 53f23a1c..83bef37d 100644 --- a/apps/pwa/src/hooks/useRateApp.ts +++ b/apps/pwa/src/hooks/useRateApp.ts @@ -1,5 +1,5 @@ -import NativeBridge from "@/NativeBridge"; -import { useLocalStorage } from "@/hooks/useLocalStorage"; +import NativeBridge from "#src/NativeBridge"; +import { useLocalStorage } from "#src/hooks/useLocalStorage"; import { useCallback } from "react"; export interface RateAppConfig { diff --git a/apps/pwa/src/hooks/useSettings.ts b/apps/pwa/src/hooks/useSettings.ts index fbe823b0..8a3875d2 100644 --- a/apps/pwa/src/hooks/useSettings.ts +++ b/apps/pwa/src/hooks/useSettings.ts @@ -2,7 +2,7 @@ import { useCallback } from "react"; import { produce } from "immer"; import { useLocalStorage } from "./useLocalStorage"; import { DEFAULT_THEME } from "./useTheme"; -import { getBrowserLocale } from "@/services/locale/getBrowserLocale"; +import { getBrowserLocale } from "#src/services/locale/getBrowserLocale"; export interface ElementSettings { atomic: number; diff --git a/apps/pwa/src/hooks/useTestSettings.ts b/apps/pwa/src/hooks/useTestSettings.ts index 28bd75b7..e362558c 100644 --- a/apps/pwa/src/hooks/useTestSettings.ts +++ b/apps/pwa/src/hooks/useTestSettings.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { Element } from "@/Element"; +import { Element } from "#src/Element"; import { useSettings, Settings, ElementsSettings } from "./useSettings"; import { useElements } from "./useElements"; diff --git a/apps/pwa/src/hooks/useTheme.ts b/apps/pwa/src/hooks/useTheme.ts index 874dfcd0..76eb24fa 100644 --- a/apps/pwa/src/hooks/useTheme.ts +++ b/apps/pwa/src/hooks/useTheme.ts @@ -1,4 +1,4 @@ -import { logEvent } from "@/services/spycat"; +import { logEvent } from "#src/services/spycat"; import { useCallback, useMemo } from "react"; import { useSettings } from "./useSettings"; diff --git a/apps/pwa/src/index.tsx b/apps/pwa/src/index.tsx index 1316713f..23b47782 100644 --- a/apps/pwa/src/index.tsx +++ b/apps/pwa/src/index.tsx @@ -6,8 +6,8 @@ import { BrowserRouter } from "react-router-dom"; import "hammerjs"; -import { initSentry } from "@/services/sentry"; -import { loadFlags } from "@/services/flags"; +import { initSentry } from "#src/services/sentry"; +import { loadFlags } from "#src/services/flags"; import App from "./components/App"; import invariant from "invariant"; import { I18nProvider } from "@lingui/react"; diff --git a/apps/pwa/src/layouts/MainLayout.tsx b/apps/pwa/src/layouts/MainLayout.tsx index a971186f..5ecc4b47 100644 --- a/apps/pwa/src/layouts/MainLayout.tsx +++ b/apps/pwa/src/layouts/MainLayout.tsx @@ -1,7 +1,7 @@ -import Icon from "@/components/shared/icon/Icon"; -import { useLocale } from "@/hooks/useLocale"; -import { useShouldAnimate } from "@/hooks/useShouldAnimate"; -import { cn } from "@/utils/styles"; +import Icon from "#src/components/shared/icon/Icon"; +import { useLocale } from "#src/hooks/useLocale"; +import { useShouldAnimate } from "#src/hooks/useShouldAnimate"; +import { cn } from "#src/utils/styles"; import { Button } from "react-aria-components"; import { useNavigate, useMatch, Outlet } from "react-router-dom"; diff --git a/apps/pwa/src/screens/Home.tsx b/apps/pwa/src/screens/Home.tsx index a3bdd82c..77e2979d 100644 --- a/apps/pwa/src/screens/Home.tsx +++ b/apps/pwa/src/screens/Home.tsx @@ -1,14 +1,14 @@ -import Atom from "@/components/atom"; -import PeriodicTable from "@/components/periodic-table/PeriodicTable"; -import PtElementInfo from "@/components/pt-element/PtElementInfo"; -import { useSearchInput } from "@/components/search-view/useSearchInput"; -import Icon from "@/components/shared/icon/Icon"; -import { useElements } from "@/hooks/useElements"; -import { useLocale } from "@/hooks/useLocale"; -import { usePreventDocumentOverscroll } from "@/hooks/usePreventDocumentOverscroll"; -import { useAddRecent } from "@/hooks/useRecent"; -import { useShouldAnimate } from "@/hooks/useShouldAnimate"; -import { cn } from "@/utils/styles"; +import Atom from "#src/components/atom"; +import PeriodicTable from "#src/components/periodic-table/PeriodicTable"; +import PtElementInfo from "#src/components/pt-element/PtElementInfo"; +import { useSearchInput } from "#src/components/search-view/useSearchInput"; +import Icon from "#src/components/shared/icon/Icon"; +import { useElements } from "#src/hooks/useElements"; +import { useLocale } from "#src/hooks/useLocale"; +import { usePreventDocumentOverscroll } from "#src/hooks/usePreventDocumentOverscroll"; +import { useAddRecent } from "#src/hooks/useRecent"; +import { useShouldAnimate } from "#src/hooks/useShouldAnimate"; +import { cn } from "#src/utils/styles"; import { Button, Dialog, diff --git a/apps/pwa/src/services/flags.tsx b/apps/pwa/src/services/flags.tsx index b8be630e..c360c455 100644 --- a/apps/pwa/src/services/flags.tsx +++ b/apps/pwa/src/services/flags.tsx @@ -1,4 +1,4 @@ -import NativeBridge from "@/NativeBridge"; +import NativeBridge from "#src/NativeBridge"; import { create } from "zustand"; const REMOTE_FLAGS_SERVICE_ENDPOINT = String( diff --git a/apps/pwa/src/services/locale/getBrowserLocale.ts b/apps/pwa/src/services/locale/getBrowserLocale.ts index 0414991e..96a5914f 100644 --- a/apps/pwa/src/services/locale/getBrowserLocale.ts +++ b/apps/pwa/src/services/locale/getBrowserLocale.ts @@ -1,4 +1,4 @@ -import NativeBridge from "@/NativeBridge"; +import NativeBridge from "#src/NativeBridge"; import { DEFAULT_LOCALE } from "./defaultLocale"; export function getBrowserLocale() { diff --git a/apps/pwa/src/services/sentry.tsx b/apps/pwa/src/services/sentry.tsx index 6f205979..009b55d3 100644 --- a/apps/pwa/src/services/sentry.tsx +++ b/apps/pwa/src/services/sentry.tsx @@ -1,4 +1,4 @@ -import { BRANCH, COMMIT_HASH } from "@/constants"; +import { BRANCH, COMMIT_HASH } from "#src/constants"; import * as SentrySDK from "@sentry/react"; import { useEffect } from "react"; import { diff --git a/apps/pwa/tsconfig.json b/apps/pwa/tsconfig.json index d22cb129..e25fc6b6 100644 --- a/apps/pwa/tsconfig.json +++ b/apps/pwa/tsconfig.json @@ -6,7 +6,6 @@ "experimentalDecorators": true, "baseUrl": "./", "paths": { - "@/*": ["./src/*"], "#*": ["./*"] } }, diff --git a/apps/pwa/vite.config.mts b/apps/pwa/vite.config.mts index 54cc5210..13b68867 100644 --- a/apps/pwa/vite.config.mts +++ b/apps/pwa/vite.config.mts @@ -56,9 +56,6 @@ export default defineConfig({ }), ], resolve: { - alias: { - "@": path.resolve("./src"), - }, dedupe: ["react", "react-dom"], }, server: {