From c9fefc03095afc8bba2ccde9a8e6f272a9286fbd Mon Sep 17 00:00:00 2001 From: Himanshu Kansal Date: Thu, 20 Apr 2023 15:05:02 +0530 Subject: [PATCH] TP-25967 | Added Web Alias config + Updating NewAddressContainer with alias (#266) --- .../NewAddressContainer.tsx | 22 +++++++++---------- tsconfig.json | 18 +++++++++++++-- types.d.ts | 14 ++++++++++++ 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/screens/addressGeolocation/NewAddressContainer.tsx b/src/screens/addressGeolocation/NewAddressContainer.tsx index 508d8036..9fb4c89d 100644 --- a/src/screens/addressGeolocation/NewAddressContainer.tsx +++ b/src/screens/addressGeolocation/NewAddressContainer.tsx @@ -1,20 +1,20 @@ import { Dimensions, ScrollView, StyleSheet, Text, View } from 'react-native'; import React from 'react'; -import NavigationHeader from '../../../RN-UI-LIB/src/components/NavigationHeader'; -import { goBack, navigateToScreen } from '../../components/utlis/navigationUtlis'; -import { useAppDispatch } from '../../hooks'; -import { COLORS } from '../../../RN-UI-LIB/src/styles/colors'; -import { GenericStyles } from '../../../RN-UI-LIB/src/styles'; +import NavigationHeader from '@RN-UI-LIB/components/NavigationHeader'; +import { goBack, navigateToScreen } from '@components/utlis/navigationUtlis'; +import { useAppDispatch } from '@hooks/index'; +import { COLORS } from '@RN-UI-LIB/styles/colors'; +import { GenericStyles } from '@RN-UI-LIB/styles'; import { Controller, useForm } from 'react-hook-form'; -import TextInput from '../../../RN-UI-LIB/src/components/TextInput'; -import Button from '../../../RN-UI-LIB/src/components/Button'; -import useIsOnline from '../../hooks/useIsOnline'; -import { toast } from '../../../RN-UI-LIB/src/components/toast'; +import TextInput from '@RN-UI-LIB/components/TextInput'; +import Button from '@RN-UI-LIB/components/Button'; +import useIsOnline from '@hooks/useIsOnline'; +import { toast } from '@RN-UI-LIB/components/toast'; import { IAddAddressPayload, IAddressGeolocationPayload } from '../../types/addressGeolocation.types'; -import { addAddress } from '../../action/addressGeolocationAction'; +import { addAddress } from '@action/addressGeolocationAction'; import { PageRouteEnum } from '../auth/ProtectedRouter'; import { useSelector } from 'react-redux'; -import { RootState } from '../../store/store'; +import { RootState } from '@store/store'; const PAGE_TITLE = 'Adding new address'; diff --git a/tsconfig.json b/tsconfig.json index bc394ebd..60d7da8b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,22 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": ["dom","es5","es2020"], - + "paths": { + "@RN-UI-LIB/*": ["./RN-UI-LIB/src/*"], + "@action/*": ["./src/action/*"], + "@assets/*": ["./src/assets/*"], + "@common/*": ["./src/common/*"], + "@components/*": ["./src/components/*"], + "@constants/*": ["./src/constants/*"], + "@hooks/*": ["./src/hooks/*"], + "@mock-api/*": ["./src/mock-api/*"], + "@reducer/*": ["./src/reducer/*"], + "@screens/*": ["./src/screens/*"], + "@services/*": ["./src/services/*"], + "@store/*": ["./src/store/*"], + "@wmDB/*": ["./src/wmDB/*"] + }, /* Completeness */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, + } } diff --git a/types.d.ts b/types.d.ts index 28c5baec..81d9a6c0 100644 --- a/types.d.ts +++ b/types.d.ts @@ -5,3 +5,17 @@ declare global { server: any; } } + +declare module '@RN-UI-LIB/*'; +declare module "@action/*"; +declare module "@assets/*"; +declare module "@common/*"; +declare module "@components/*"; +declare module "@constants/*"; +declare module "@hooks/*"; +declare module "@mock-api/*"; +declare module "@reducer/*"; +declare module "@screens/*"; +declare module "@services/*"; +declare module "@store/*"; +declare module "@wmDB/*";