diff --git a/package-lock.json b/package-lock.json index 0935e2a..5fd19c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ }, "devDependencies": { "@chargebee/chargebee-js-types": "^1.0.1", + "@types/node": "^20.5.1", "@types/react": "^18.2.6", "@types/react-dom": "^18.2.4", "@types/react-router-dom": "^5.3.3", @@ -1018,6 +1019,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/node": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz", + "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==", + "dev": true + }, "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", @@ -4011,6 +4018,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "@types/node": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz", + "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==", + "dev": true + }, "@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", diff --git a/package.json b/package.json index 4c333e1..6f05c1c 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@chargebee/chargebee-js-types": "^1.0.1", + "@types/node": "^20.5.1", "@types/react": "^18.2.6", "@types/react-dom": "^18.2.4", "@types/react-router-dom": "^5.3.3", diff --git a/src/api/resources/Apps.ts b/src/api/resources/Apps.ts index 839d758..8cca9ea 100644 --- a/src/api/resources/Apps.ts +++ b/src/api/resources/Apps.ts @@ -1,4 +1,4 @@ -import routes from '../../routes' +import routes from '@/routes' import { getBaseHeaders } from '../utils' export interface Payload { diff --git a/src/api/resources/AssetCategories.ts b/src/api/resources/AssetCategories.ts index dc22983..81200ad 100644 --- a/src/api/resources/AssetCategories.ts +++ b/src/api/resources/AssetCategories.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/Assets.ts b/src/api/resources/Assets.ts index ab9ce41..6c744b7 100644 --- a/src/api/resources/Assets.ts +++ b/src/api/resources/Assets.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { AssetCategory } from "./AssetCategories" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/Auras.ts b/src/api/resources/Auras.ts index 8957b8e..4c2452a 100644 --- a/src/api/resources/Auras.ts +++ b/src/api/resources/Auras.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/AuthTokens.ts b/src/api/resources/AuthTokens.ts index 59c9300..4b15ac0 100644 --- a/src/api/resources/AuthTokens.ts +++ b/src/api/resources/AuthTokens.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthToken } from "../types" import { User } from "./User" import { getBaseHeaders } from "../utils" diff --git a/src/api/resources/Element.ts b/src/api/resources/Element.ts index ad58ce2..0de9cb8 100644 --- a/src/api/resources/Element.ts +++ b/src/api/resources/Element.ts @@ -1,4 +1,4 @@ -import routes from '../../routes' +import routes from '@/routes' import { getBaseHeaders } from '../utils' export interface Payload { diff --git a/src/api/resources/Elements.ts b/src/api/resources/Elements.ts index ef4ff22..0461580 100644 --- a/src/api/resources/Elements.ts +++ b/src/api/resources/Elements.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { getBaseHeaders } from "../utils" export interface Payload { diff --git a/src/api/resources/User.ts b/src/api/resources/User.ts index 8ebe9b3..10df905 100644 --- a/src/api/resources/User.ts +++ b/src/api/resources/User.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/UserDailyForecasts.ts b/src/api/resources/UserDailyForecasts.ts index 02bf673..612b253 100644 --- a/src/api/resources/UserDailyForecasts.ts +++ b/src/api/resources/UserDailyForecasts.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/UserPaymentIntents.ts b/src/api/resources/UserPaymentIntents.ts index 4b8df9b..c20ab27 100644 --- a/src/api/resources/UserPaymentIntents.ts +++ b/src/api/resources/UserPaymentIntents.ts @@ -1,7 +1,7 @@ import { PaymentIntent } from '@chargebee/chargebee-js-types' import { AuthPayload } from '../types' import { getAuthHeaders } from '../utils' -import routes from '../../routes' +import routes from '@/routes' export interface Payload extends AuthPayload { paymentMethod: PaymentMethod diff --git a/src/api/resources/UserSubscriptionCheckout.ts b/src/api/resources/UserSubscriptionCheckout.ts index 624a3ca..d375f90 100644 --- a/src/api/resources/UserSubscriptionCheckout.ts +++ b/src/api/resources/UserSubscriptionCheckout.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/UserSubscriptionItemPrices.ts b/src/api/resources/UserSubscriptionItemPrices.ts index d177a21..b8f0194 100644 --- a/src/api/resources/UserSubscriptionItemPrices.ts +++ b/src/api/resources/UserSubscriptionItemPrices.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/UserSubscriptionReceipts.ts b/src/api/resources/UserSubscriptionReceipts.ts index 74647cd..6ed5948 100644 --- a/src/api/resources/UserSubscriptionReceipts.ts +++ b/src/api/resources/UserSubscriptionReceipts.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/api/resources/UserSubscriptionStatus.ts b/src/api/resources/UserSubscriptionStatus.ts index 6ec0b1c..32c5a79 100644 --- a/src/api/resources/UserSubscriptionStatus.ts +++ b/src/api/resources/UserSubscriptionStatus.ts @@ -1,4 +1,4 @@ -import routes from "../../routes" +import routes from "@/routes" import { AuthPayload } from "../types" import { getAuthHeaders } from "../utils" diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index a7b401a..a90dc34 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -2,10 +2,10 @@ import { useState } from 'react' import { Routes, Route, Navigate, Outlet, useLocation, useNavigate } from 'react-router-dom' -import { useAuth } from '../../auth' +import { useAuth } from '@/auth' import { useSelector } from 'react-redux' -import { selectors } from '../../store' -import routes, { hasNavigation, getRouteBy, hasNoFooter } from '../../routes' +import { selectors } from '@/store' +import routes, { hasNavigation, getRouteBy, hasNoFooter } from '@/routes' import BirthdayPage from '../BirthdayPage' import BirthtimePage from '../BirthtimePage' import CreateProfilePage from '../CreateProfilePage' diff --git a/src/components/AttentionPage/index.tsx b/src/components/AttentionPage/index.tsx index 5a808bc..bcd4485 100644 --- a/src/components/AttentionPage/index.tsx +++ b/src/components/AttentionPage/index.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import Title from '../Title' -import routes from '../../routes' +import routes from '@/routes' import styles from './styles.module.css' import CheckboxWithText from '../CheckboxWithText' import SpecialWelcomeOffer from '../SpecialWelcomeOffer' diff --git a/src/components/BirthdayPage/index.tsx b/src/components/BirthdayPage/index.tsx index 1a863ee..eb1efc5 100644 --- a/src/components/BirthdayPage/index.tsx +++ b/src/components/BirthdayPage/index.tsx @@ -2,13 +2,13 @@ import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' -import { actions, selectors } from '../../store' +import { actions, selectors } from '@/store' import { DatePicker } from '../DateTimePicker' import MainButton from '../MainButton' import Policy from '../Policy' import Purposes from '../Purposes' import Title from '../Title' -import routes from '../../routes' +import routes from '@/routes' import './styles.css' function BirthdayPage(): JSX.Element { diff --git a/src/components/BirthtimePage/index.tsx b/src/components/BirthtimePage/index.tsx index cb27d3a..6f4cb8c 100644 --- a/src/components/BirthtimePage/index.tsx +++ b/src/components/BirthtimePage/index.tsx @@ -1,11 +1,11 @@ import { useNavigate } from "react-router-dom" import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' -import { actions, selectors } from '../../store' +import { actions, selectors } from '@/store' import { TimePicker } from "../DateTimePicker" import Title from "../Title" import MainButton from "../MainButton" -import routes from "../../routes" +import routes from "@/routes" import './styles.css' function BirthtimePage(): JSX.Element { diff --git a/src/components/CreateProfilePage/index.tsx b/src/components/CreateProfilePage/index.tsx index 7f5cf80..60d5bd5 100644 --- a/src/components/CreateProfilePage/index.tsx +++ b/src/components/CreateProfilePage/index.tsx @@ -3,10 +3,10 @@ import { useNavigate } from "react-router-dom" import { CircularProgressbar, buildStyles } from 'react-circular-progressbar' import { useTranslation } from 'react-i18next' import ProcessFlow from "./ProcessFlow" -import routes from "../../routes" +import routes from "@/routes" import styles from './styles.module.css' import { useSelector } from "react-redux" -import { selectors } from "../../store" +import { selectors } from "@/store" const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) diff --git a/src/components/DateTimePicker/DateInput.tsx b/src/components/DateTimePicker/DateInput.tsx index 47d2a68..e37c4bf 100644 --- a/src/components/DateTimePicker/DateInput.tsx +++ b/src/components/DateTimePicker/DateInput.tsx @@ -1,4 +1,4 @@ -import { FormField } from '../../types' +import { FormField } from '@/types' import { normalize, calculateMaxValue } from './utils' type DatePartValue = string | undefined diff --git a/src/components/DateTimePicker/DatePicker.tsx b/src/components/DateTimePicker/DatePicker.tsx index 697dc70..96bc456 100644 --- a/src/components/DateTimePicker/DatePicker.tsx +++ b/src/components/DateTimePicker/DatePicker.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { FormField } from '../../types' +import { FormField } from '@/types' import DateInput from './DateInput' import ErrorText from '../ErrorText' import { stringify, getCurrentYear } from './utils' diff --git a/src/components/DidYouKnowPage/index.tsx b/src/components/DidYouKnowPage/index.tsx index fab3327..b981932 100644 --- a/src/components/DidYouKnowPage/index.tsx +++ b/src/components/DidYouKnowPage/index.tsx @@ -2,11 +2,11 @@ import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import MainButton from '../MainButton' import Title from '../Title' -import routes from '../../routes' +import routes from '@/routes' import styles from './styles.module.css' import { useSelector } from 'react-redux' -import { selectors } from '../../store' -import { getZodiacSignByDate } from '../../zodiac-sign' +import { selectors } from '@/store' +import { getZodiacSignByDate } from '@/services/zodiac-sign' import SpecialWelcomeOffer from '../SpecialWelcomeOffer' import { useState } from 'react' diff --git a/src/components/EmailEnterPage/EmailInput.tsx b/src/components/EmailEnterPage/EmailInput.tsx index 1a9a010..be9466e 100644 --- a/src/components/EmailEnterPage/EmailInput.tsx +++ b/src/components/EmailEnterPage/EmailInput.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { FormField } from '../../types' +import { FormField } from '@/types' import './styles.css' const isValidEmail = (email: string) => { diff --git a/src/components/EmailEnterPage/index.tsx b/src/components/EmailEnterPage/index.tsx index 9366659..06b99c5 100644 --- a/src/components/EmailEnterPage/index.tsx +++ b/src/components/EmailEnterPage/index.tsx @@ -2,17 +2,17 @@ import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' -import { actions, selectors } from '../../store' -import { getClientTimezone } from '../../locales' -import { useAuth } from '../../auth' -import { useApi, ApiError, extractErrorMessage } from '../../api' +import { actions, selectors } from '@/store' +import { getClientTimezone } from '@/locales' +import { useAuth } from '@/auth' +import { useApi, ApiError, extractErrorMessage } from '@/api' import Title from '../Title' import Policy from '../Policy' import EmailInput from './EmailInput' import MainButton from '../MainButton' import Loader, { LoaderColor } from '../Loader' import ErrorText from '../ErrorText' -import routes from '../../routes' +import routes from '@/routes' function EmailEnterPage(): JSX.Element { const api = useApi() diff --git a/src/components/FeedbackPage/index.tsx b/src/components/FeedbackPage/index.tsx index af3c72e..3a7a83c 100644 --- a/src/components/FeedbackPage/index.tsx +++ b/src/components/FeedbackPage/index.tsx @@ -1,6 +1,6 @@ import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' -import routes from '../../routes' +import routes from '@/routes' import styles from './styles.module.css' import MainButton from '../MainButton' diff --git a/src/components/FreePeriodInfoPage/index.tsx b/src/components/FreePeriodInfoPage/index.tsx index 7d18ffb..959506d 100644 --- a/src/components/FreePeriodInfoPage/index.tsx +++ b/src/components/FreePeriodInfoPage/index.tsx @@ -1,11 +1,11 @@ import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import Title from '../Title' -import routes from '../../routes' +import routes from '@/routes' import styles from './styles.module.css' import { useCallback } from 'react' import { useDispatch } from 'react-redux' -import { actions } from '../../store' +import { actions } from '@/store' function FreePeriodInfoPage(): JSX.Element { const { t } = useTranslation() diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 4a1ba52..5665ec9 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react' import { useNavigate, useLocation } from 'react-router-dom' import { useTranslation } from 'react-i18next' -import routes, { hasCrossButton, hasNavigation, isNotEntrypoint } from '../../routes' +import routes, { hasCrossButton, hasNavigation, isNotEntrypoint } from '@/routes' import BackButton from './BackButton' import iconUrl from './icon.png' import menuUrl from './menu.png' diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 525ab05..2b1326e 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -1,8 +1,8 @@ import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' -import { useAuth } from '../../auth' -import { useLegal } from '../../legal' -import routes from '../../routes' +import { useAuth } from '@/auth' +import { useLegal } from '@/legal' +import routes from '@/routes' import './styles.css' type NavbarProps = { diff --git a/src/components/PaymentPage/index.tsx b/src/components/PaymentPage/index.tsx index ebdb2d0..762502f 100644 --- a/src/components/PaymentPage/index.tsx +++ b/src/components/PaymentPage/index.tsx @@ -2,9 +2,9 @@ import { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' -import { selectors } from '../../store' -import { usePayment } from '../../payment' -import { actions } from '../../store' +import { selectors } from '@/store' +import { usePayment } from '@/payment' +import { actions } from '@/store' import { ApplePayBanner, ApplePayButton, @@ -18,7 +18,7 @@ import UserHeader from '../UserHeader' import Title from '../Title' import Loader from '../Loader' import secure from './secure.png' -import routes from '../../routes' +import routes from '@/routes' import './styles.css' function PaymentPage(): JSX.Element { diff --git a/src/components/PaymentPage/methods/ApplePay/Button.tsx b/src/components/PaymentPage/methods/ApplePay/Button.tsx index b702cb3..e062afa 100644 --- a/src/components/PaymentPage/methods/ApplePay/Button.tsx +++ b/src/components/PaymentPage/methods/ApplePay/Button.tsx @@ -1,11 +1,11 @@ import { useCallback, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { PaymentIntent } from '@chargebee/chargebee-js-types' -import { useApi, useApiCall, extractErrorMessage, SubscriptionReceipts } from '../../../../api' -import { usePayment, ApplePayButtonOptions } from '../../../../payment' -import { useAuth } from '../../../../auth' -import Loader, { LoaderColor } from '../../../Loader' -import ErrorText from '../../../ErrorText' +import { useApi, useApiCall, extractErrorMessage, SubscriptionReceipts } from '@/api' +import { usePayment, ApplePayButtonOptions } from '@/payment' +import { useAuth } from '@/auth' +import Loader, { LoaderColor } from '@/components/Loader' +import ErrorText from '@/components/ErrorText' const currencyCode = 'USD' const paymentMethod = 'apple_pay' diff --git a/src/components/PaymentPage/methods/Card/Button.tsx b/src/components/PaymentPage/methods/Card/Button.tsx index 613efca..fe4f8be 100644 --- a/src/components/PaymentPage/methods/Card/Button.tsx +++ b/src/components/PaymentPage/methods/Card/Button.tsx @@ -1,6 +1,6 @@ import { useTranslation } from 'react-i18next' -import MainButton from '../../../MainButton' +import MainButton from '@/components/MainButton' import card from './card.svg' interface CardButtonProps { diff --git a/src/components/PaymentPage/methods/Card/Modal.tsx b/src/components/PaymentPage/methods/Card/Modal.tsx index a4001ce..7bc7a26 100644 --- a/src/components/PaymentPage/methods/Card/Modal.tsx +++ b/src/components/PaymentPage/methods/Card/Modal.tsx @@ -5,13 +5,13 @@ import { } from '@chargebee/chargebee-js-react-wrapper' import ChargebeeComponents from '@chargebee/chargebee-js-react-wrapper/dist/components/ComponentGroup' import { PaymentIntent } from '@chargebee/chargebee-js-types' -import { usePayment } from '../../../../payment' -import { useApi, SubscriptionReceipts, useApiCall } from '../../../../api' -import { useAuth } from '../../../../auth' -import Modal from '../../../Modal' -import Title from '../../../Title' -import MainButton from '../../../MainButton' -import Loader from '../../../Loader' +import { usePayment } from '@/payment' +import { useApi, SubscriptionReceipts, useApiCall } from '@/api' +import { useAuth } from '@/auth' +import Modal from '@/components/Modal' +import Title from '@/components/Title' +import MainButton from '@/components/MainButton' +import Loader from '@/components/Loader' import visa from './visa.svg' import mastercard from './mastercard.svg' import amex from './amex.svg' diff --git a/src/components/PaymentPage/methods/GooglePay/Button.tsx b/src/components/PaymentPage/methods/GooglePay/Button.tsx index 67b4853..cf9a8a9 100644 --- a/src/components/PaymentPage/methods/GooglePay/Button.tsx +++ b/src/components/PaymentPage/methods/GooglePay/Button.tsx @@ -1,11 +1,11 @@ import { useCallback, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { PaymentIntent } from '@chargebee/chargebee-js-types' -import { SubscriptionReceipts, extractErrorMessage, useApi, useApiCall } from '../../../../api' -import { usePayment, GooglePayButtonOptions } from '../../../../payment' -import { useAuth } from '../../../../auth' -import Loader, { LoaderColor } from '../../../Loader' -import ErrorText from '../../../ErrorText' +import { SubscriptionReceipts, extractErrorMessage, useApi, useApiCall } from '@/api' +import { usePayment, GooglePayButtonOptions } from '@/payment' +import { useAuth } from '@/auth' +import Loader, { LoaderColor } from '@/components/Loader' +import ErrorText from '@/components/ErrorText' const currencyCode = 'USD' const paymentMethod = 'google_pay' diff --git a/src/components/SpecialWelcomeOffer/index.tsx b/src/components/SpecialWelcomeOffer/index.tsx index 4ddde0a..4b42420 100644 --- a/src/components/SpecialWelcomeOffer/index.tsx +++ b/src/components/SpecialWelcomeOffer/index.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import Title from '../Title' -import routes from '../../routes' +import routes from '@/routes' import styles from './styles.module.css' import ModalTop from '../ModalTop' import Header from '../Header' diff --git a/src/components/StaticPage/index.tsx b/src/components/StaticPage/index.tsx index 6c27d44..63ee3a1 100644 --- a/src/components/StaticPage/index.tsx +++ b/src/components/StaticPage/index.tsx @@ -1,6 +1,6 @@ import { useParams } from 'react-router' import { useTranslation } from 'react-i18next' -import { useApi, useApiCall, Element } from '../../api' +import { useApi, useApiCall, Element } from '@/api' import { useCallback } from 'react' import parse from 'html-react-parser' import Loader from '../Loader' diff --git a/src/components/SubscriptionPage/index.tsx b/src/components/SubscriptionPage/index.tsx index 716bf7c..5ca0d63 100644 --- a/src/components/SubscriptionPage/index.tsx +++ b/src/components/SubscriptionPage/index.tsx @@ -1,14 +1,14 @@ import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' -import { selectors } from '../../store' +import { selectors } from '@/store' import MainButton from '../MainButton' import Policy from '../Policy' import Countdown from '../Countdown' import PaymentTable, { Currency, Locale } from '../PaymentTable' import UserHeader from '../UserHeader' import CallToAction from '../CallToAction' -import routes from '../../routes' +import routes from '@/routes' import './styles.css' const currency = Currency.USD diff --git a/src/components/WallpaperPage/index.tsx b/src/components/WallpaperPage/index.tsx index 5e86506..57f3054 100644 --- a/src/components/WallpaperPage/index.tsx +++ b/src/components/WallpaperPage/index.tsx @@ -1,7 +1,7 @@ import { useCallback } from 'react' import { useTranslation } from 'react-i18next' -import { useAuth } from '../../auth' -import { useApi, useApiCall, Assets, DailyForecasts } from '../../api' +import { useAuth } from '@/auth' +import { useApi, useApiCall, Assets, DailyForecasts } from '@/api' import { saveFile, buildFilename } from './utils' import Loader, { LoaderColor } from '../Loader' import './styles.css' diff --git a/src/index.css b/src/index.css index d794387..243b5ae 100644 --- a/src/index.css +++ b/src/index.css @@ -122,3 +122,7 @@ a,button,div,input,select,textarea { .CircularProgressbar { position: relative; } + +button { + cursor: pointer; +} diff --git a/src/zodiac-sign/index.ts b/src/services/zodiac-sign/index.ts similarity index 100% rename from src/zodiac-sign/index.ts rename to src/services/zodiac-sign/index.ts diff --git a/tsconfig.json b/tsconfig.json index c81ef9f..5cb5eb6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,5 +20,6 @@ "noFallthroughCasesInSwitch": true }, "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] + "references": [{ "path": "./tsconfig.node.json" }], + "extends": "./tsconfig.paths.json" } diff --git a/tsconfig.paths.json b/tsconfig.paths.json new file mode 100644 index 0000000..3255bae --- /dev/null +++ b/tsconfig.paths.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": [ + "./src/*" + ] + } + } +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 5a33944..f69953c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,11 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import * as path from 'path' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + resolve: { + alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }], + }, })