diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index ba350c4b..00000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "cSpell.words": [
- "Pressable",
- "utlis"
- ]
-}
\ No newline at end of file
diff --git a/firebase.json b/firebase.json
index 23a2300f..2d124d65 100644
--- a/firebase.json
+++ b/firebase.json
@@ -2,6 +2,6 @@
"react-native": {
"crashlytics_debug_enabled": false,
"android_task_executor_maximum_pool_size": 20,
- "android_task_executor_keep_alive_seconds": 5,
+ "android_task_executor_keep_alive_seconds": 5
}
}
diff --git a/src/common/BlockerScreen.tsx b/src/common/BlockerScreen.tsx
index d88117d0..67bdc2f8 100644
--- a/src/common/BlockerScreen.tsx
+++ b/src/common/BlockerScreen.tsx
@@ -166,16 +166,16 @@ const BlockerScreen = (props: IBlockerScreen) => {
);
}
- // if (!isTimeSynced) {
- // const { heading, instructions } = BLOCKER_SCREEN_DATA.TIME_UNSYNC;
- // return (
- //
- // );
- // }
+ if (!isTimeSynced) {
+ const { heading, instructions } = BLOCKER_SCREEN_DATA.TIME_UNSYNC;
+ return (
+
+ );
+ }
if (!isDeviceLocationEnabled) {
const { heading, instructions } = BLOCKER_SCREEN_DATA.DEVICE_LOCATION_OFF;
diff --git a/src/components/utlis/apiHelper.ts b/src/components/utlis/apiHelper.ts
index 67014520..06ab2286 100644
--- a/src/components/utlis/apiHelper.ts
+++ b/src/components/utlis/apiHelper.ts
@@ -67,18 +67,6 @@ export enum ApiKeys {
DAILY_COMMITMENT = 'DAILY_COMMITMENT',
GET_PTP_AMOUNT = 'GET_PTP_AMOUNT',
GET_VISIBILITY_STATUS = 'GET_VISIBILITY_STATUS',
- // csa
-
- GET_CSA_TICKETS = 'GET_CSA_TICKETS',
- GET_CSA_SINGLE_TICKET = 'GET_CSA_SINGLE_TICKET',
- CREATE_TICKET = 'CREATE_TICKET',
- ACKNOWLEDGE_TICKET = 'ACKNOWLEDGE_TICKET',
- ADD_COMMENT = 'ADD_COMMENT',
- UPDATE_TICKET_STATUS = 'UPDATE_TICKET_STATUS',
- GET_CSA_FILTERS = 'GET_CSA_FILTERS',
- GET_FORM_OPTIONS = 'GET_FORM_OPTIONS',
- GET_UPDATE_COUNT = 'GET_UPDATE_COUNT',
-
}
export const API_URLS: Record = {} as Record;
@@ -131,16 +119,6 @@ API_URLS[ApiKeys.DAILY_COMMITMENT] = '/daily-commitment';
API_URLS[ApiKeys.GET_PTP_AMOUNT] = '/ptps-due-view/agent-detail';
API_URLS[ApiKeys.GET_VISIBILITY_STATUS] = '/daily-commitment/visibility';
-
-API_URLS[ApiKeys.GET_CSA_TICKETS] = '/support-requests/fetch-all';
-API_URLS[ApiKeys.GET_CSA_SINGLE_TICKET] = '/support-requests/{ticketReferenceId}';
-API_URLS[ApiKeys.CREATE_TICKET] = '/support-requests';
-API_URLS[ApiKeys.ACKNOWLEDGE_TICKET] = '/support-requests/{ticketReferenceId}/acknowledge?supportRequestUserType=FE';
-API_URLS[ApiKeys.ADD_COMMENT] = '/support-requests/{ticketReferenceId}/comments';
-API_URLS[ApiKeys.UPDATE_TICKET_STATUS] = '/support-requests/{ticketReferenceId}';
-API_URLS[ApiKeys.GET_CSA_FILTERS] = '/support-requests/filters';
-API_URLS[ApiKeys.GET_FORM_OPTIONS] = '/support-requests/form'
-API_URLS[ApiKeys.GET_UPDATE_COUNT] = '/support-requests/summary'
export const API_STATUS_CODE = {
OK: 200,
CREATED: 201,
@@ -285,10 +263,10 @@ axiosInstance.interceptors.response.use(
});
}
- // if ([API_STATUS_CODE.UNAUTHORIZED, API_STATUS_CODE.FORBIDDEN].includes(response.status)) {
- // // Reset user info
- // dispatch(handleLogout());
- // }
+ if ([API_STATUS_CODE.UNAUTHORIZED, API_STATUS_CODE.FORBIDDEN].includes(response.status)) {
+ // Reset user info
+ dispatch(handleLogout());
+ }
return Promise.reject(error);
}
@@ -298,12 +276,11 @@ axiosInstance.interceptors.response.use(
resolve();
}, 500);
});
- return axiosInstance(config);
+ return delayRetryRequest.then(() => axiosInstance(config));
}
);
axiosInstance.defaults.headers.common['Content-Type'] = 'application/json';
-axiosInstance.defaults.headers.common['routing_key'] = '2aeff6e1-c6c8-4cf2-9e47-daf3de565483';
axiosInstance.defaults.baseURL = BASE_AV_APP_URL;
// TODO:: Ideally should happen through middlewares.
diff --git a/src/reducer/cosmosSupportSlice.ts b/src/reducer/cosmosSupportSlice.ts
index a2cfeb27..5f88aaea 100644
--- a/src/reducer/cosmosSupportSlice.ts
+++ b/src/reducer/cosmosSupportSlice.ts
@@ -1,13 +1,10 @@
import { createSlice } from '@reduxjs/toolkit';
import { GetTicketCreationPayload, RequestTicket, Summary } from '@screens/cosmosSupport/constant/types';
-interface IConfigData {
- supportLink: '';
-}
-interface IConfigSlice {
- data: IConfigData;
+
+interface ICSASlice {
loading: boolean;
ticketCreationData: {
ticketCreationData:GetTicketCreationPayload;
@@ -15,11 +12,11 @@ interface IConfigSlice {
},
caseLevelTickets: {
taskForMe: {
- data: Array;
+ data: Array;
loading: boolean;
},
taskForTele: {
- data: Array;
+ data: Array;
loading: boolean;
}
},
@@ -32,12 +29,9 @@ interface IConfigSlice {
ticketCreationInProgress: boolean;
}
-export const initialConfigData = {
- supportLink: '',
-} as IConfigData;
+
const initialState = {
- data: initialConfigData,
loading: false,
ticketCreationData: {
@@ -74,14 +68,14 @@ const initialState = {
},
isSubmittingComment: false,
ticketCreationInProgress: false,
-} as IConfigSlice;
+} as ICSASlice;
const CosmosSupport = createSlice({
name: 'config',
initialState,
reducers: {
setTicketCreationData: (state, action) => {
- state.data = action.payload;
+ state.ticketCreationData.isLoading = action.payload;
},
setLoading: (state, action) => {
state.loading = action.payload;
diff --git a/src/screens/Profile/ProfileStack.tsx b/src/screens/Profile/ProfileStack.tsx
index b6383541..87f4e1c8 100644
--- a/src/screens/Profile/ProfileStack.tsx
+++ b/src/screens/Profile/ProfileStack.tsx
@@ -45,12 +45,10 @@ const ProfileStack = () => {
>
diff --git a/src/screens/allCases/index.tsx b/src/screens/allCases/index.tsx
index f3bc29f6..b8f92447 100644
--- a/src/screens/allCases/index.tsx
+++ b/src/screens/allCases/index.tsx
@@ -108,7 +108,7 @@ const AllCasesMain = () => {
component: () => (
<>
- {shouldShowBanner || true ? = (props) => {
header='Mark as done'
moveForKeyboard={0.2}
>
-
+
void;
+ handleNavigationTODetails: () => void;
+}
+
+const CustomerDetailListItem: React.FC = (props) => {
+ const { item, viewTaskCta, handleNavigation, handleNavigationTODetails } = props;
+ return (
+
+ {item.customerName}
+
+
+ {formatAmount(item?.overdueAmount?.value)}
+ Overdue Amount
+
+
+ {item?.loanAccountNumber}
+ LAN
+
+
+
+
+
+ {viewTaskCta}
+
+
+
+ Go to customer details
+
+
+
+
+ )
+}
+
+
+const styles = StyleSheet.create({
+ tagColor: {
+ color: COLORS.BORDER.SECONDARY
+ },
+ marginLeft60: {
+ marginLeft: 60
+ },
+ buttonText: {
+ fontWeight: "500",
+ color: COLORS.BASE.BLUE
+ }
+})
+
+export default CustomerDetailListItem;
\ No newline at end of file
diff --git a/src/screens/cosmosSupport/HeaderNode.tsx b/src/screens/cosmosSupport/HeaderNode.tsx
new file mode 100644
index 00000000..ffffc848
--- /dev/null
+++ b/src/screens/cosmosSupport/HeaderNode.tsx
@@ -0,0 +1,24 @@
+import Heading from "@rn-ui-lib/components/Heading"
+import { GenericStyles } from "@rn-ui-lib/styles"
+import React from "react";
+import { View } from "react-native"
+
+
+interface IHeaderNode {
+ title: string;
+}
+
+const HeaderNode:React.FC = (props) => {
+ return (
+
+ {props.title}
+
+ )
+}
+
+export default HeaderNode
\ No newline at end of file
diff --git a/src/screens/cosmosSupport/ListItem.tsx b/src/screens/cosmosSupport/ListItem.tsx
index ebfe0dbb..871ffd42 100644
--- a/src/screens/cosmosSupport/ListItem.tsx
+++ b/src/screens/cosmosSupport/ListItem.tsx
@@ -1,28 +1,26 @@
import { navigateToScreen } from '@components/utlis/navigationUtlis'
+import { useAppDispatch } from '@hooks'
+import { resetSingleViewRequestTicket } from '@reducers/cosmosSupportSlice'
import { COLORS } from '@rn-ui-lib/colors'
import Tag, { TagVariant } from '@rn-ui-lib/components/Tag'
import Text from '@rn-ui-lib/components/Text'
import ArrowRightOutlineIcon from '@rn-ui-lib/icons/ArrowRightOutlineIcon'
import { GenericStyles } from '@rn-ui-lib/styles'
+import { ProfileScreenStackEnum } from '@screens/Profile/ProfileStack'
+import { PageRouteEnum } from '@screens/auth/ProtectedRouter'
import { CaseDetailStackEnum } from '@screens/caseDetails/CaseDetailStack'
import React from 'react'
-import { Pressable, StyleSheet, TouchableHighlight, View } from 'react-native'
+import { StyleSheet, TouchableHighlight, View } from 'react-native'
+import CustomerDetailListItem from './CustomerDetailListItem'
import RelativeTime from './RelativeTime'
-import { ProfileScreenStackEnum } from '@screens/Profile/ProfileStack'
-import { RequestTypeReadableString, SCREEN_MAP, StatusColorMapping } from './constant'
-import Heading from '@rn-ui-lib/components/Heading'
-import { formatAmount } from '@rn-ui-lib/utils/amount'
-import Button from '@rn-ui-lib/components/Button'
-import { PageRouteEnum } from '@screens/auth/ProtectedRouter'
-import { useAppDispatch } from '@hooks'
-import { resetSingleViewRequestTicket } from '@reducers/cosmosSupportSlice'
+import { Mapping, SCREEN_MAP, StatusColorMapping } from './constant'
const ListItem = (props: any) => {
const { form, route, item, task } = props;
- const viewTaskCta = task === SCREEN_MAP.TASK_FOR_ME ? "View task details": "View request details";
+ const viewTaskCta = task === SCREEN_MAP.TASK_FOR_ME ? "View task details" : "View request details";
const dispatch = useAppDispatch();
- const Component = form === "profile" ? View : TouchableHighlight;
+ const Component = form === Mapping.FORM_PROFILE ? View : TouchableHighlight;
const handleNavigation = () => {
navigateToScreen(PageRouteEnum.CASE_DETAIL_STACK, {
screen: CaseDetailStackEnum.COLLECTION_CASE_DETAIL,
@@ -32,7 +30,7 @@ const ListItem = (props: any) => {
const handleNavigationTODetails = () => {
dispatch(resetSingleViewRequestTicket(null))
- navigateToScreen(form === "profile" ? ProfileScreenStackEnum.PROFILE_TICKET_DETAIL : CaseDetailStackEnum.VIEW_REQUEST_DETAIL, { ticketId: item?.referenceId, task })
+ navigateToScreen(form === Mapping.FORM_PROFILE ? ProfileScreenStackEnum.PROFILE_TICKET_DETAIL : CaseDetailStackEnum.VIEW_REQUEST_DETAIL, { ticketId: item?.referenceId, task })
}
return (
{
- {form === "profile" ?
- Aman kumar singh
-
-
- {formatAmount(item?.overdueAmount?.value)}
- Overdue Amount
-
-
- {item?.loanAccountNumber}
- LAN
-
-
-
-
-
- {viewTaskCta}
-
-
-
- Go to customer details
-
-
-
- : null}
+ {form ===Mapping.FORM_PROFILE ? : null}
- {form === "profile" ? null : }
+ {form ===Mapping.FORM_PROFILE ? null : }
>
)
diff --git a/src/screens/cosmosSupport/RenderCommentsTimeline.tsx b/src/screens/cosmosSupport/RenderCommentsTimeline.tsx
index fddf03b8..19d5c74c 100644
--- a/src/screens/cosmosSupport/RenderCommentsTimeline.tsx
+++ b/src/screens/cosmosSupport/RenderCommentsTimeline.tsx
@@ -85,19 +85,9 @@ const CardComponent: React.FC = (props) => {
- {/*
-
-
-
- }
- > */}
{comment}
- {/* */}
)
diff --git a/src/screens/cosmosSupport/RequestDetail.tsx b/src/screens/cosmosSupport/RequestDetail.tsx
index 46ff0460..4bd047e6 100644
--- a/src/screens/cosmosSupport/RequestDetail.tsx
+++ b/src/screens/cosmosSupport/RequestDetail.tsx
@@ -28,19 +28,16 @@ interface IRequestDetail {
const RequestDetail: React.FC = (props) => {
- // const [isRefreshing, setRefreshing] = useState(false);
- const {data, isRefreshing} = useAppSelector(state => ({
+ const {data, isRefreshing, user} = useAppSelector(state => ({
data: state.cosmosSupport.currentViewRequestTicket.data,
- isRefreshing: state.cosmosSupport.currentViewRequestTicket.loading
+ isRefreshing: state.cosmosSupport.currentViewRequestTicket.loading,
+ user: state.user.user
}))
const scrollViewRef = React.useRef(null);
const [comment, setComment] = React.useState('');
const dispatch = useAppDispatch();
- const {user} = useAppSelector((state) => ({
- user: state.user.user
- }));
-
+
const onRefresh = () => {
if (!props?.route?.params?.ticketId) return;
loadData(props?.route?.params?.ticketId);
@@ -114,7 +111,7 @@ const RequestDetail: React.FC = (props) => {
Pos={data?.customerDetails?.outstandingAmount || 0}
customerName={data?.customerDetails?.customerName || ''}
status={data?.status || ''}
- refId={data?.referenceId} //todo
+ refId={data?.referenceId}
isRefreshing={isRefreshing}
isEditable={Boolean(props?.route?.params?.task)}
ticketStatusChange={loadData}
diff --git a/src/screens/cosmosSupport/RequestSupport.tsx b/src/screens/cosmosSupport/RequestSupport.tsx
index 95d90c80..bd526a95 100644
--- a/src/screens/cosmosSupport/RequestSupport.tsx
+++ b/src/screens/cosmosSupport/RequestSupport.tsx
@@ -1,41 +1,21 @@
-import { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native'
-import React, { useEffect } from 'react'
-import { GenericStyles } from '@rn-ui-lib/styles';
-import NavigationHeader from '@rn-ui-lib/components/NavigationHeader';
-import { goBack } from '@components/utlis/navigationUtlis';
-import Text from '@rn-ui-lib/components/Text';
-import Tag, { TagVariant } from '@rn-ui-lib/components/Tag';
-import Chip from '@screens/caseDetails/Chip';
-import { Controller, useForm } from 'react-hook-form';
-import TextInput from '@rn-ui-lib/components/TextInput';
-import Button from '@rn-ui-lib/components/Button';
-import PressableChip from '@rn-ui-lib/components/PressableChip';
-import { useAppDispatch, useAppSelector } from '@hooks';
-import { createTicket, getDataForTicketCreation } from './actions';
-import LineLoader from '@rn-ui-lib/components/suspense_loader/LineLoader';
-import { CreateTicketPayload, GetTicketCreationPayload } from './constant/types';
-import SuspenseLoader from '@rn-ui-lib/components/suspense_loader/SuspenseLoader';
import FullScreenLoaderWrapper from '@common/FullScreenLoaderWrapper';
-import { useDispatch } from 'react-redux';
+import { goBack } from '@components/utlis/navigationUtlis';
+import { useAppDispatch, useAppSelector } from '@hooks';
+import Button from '@rn-ui-lib/components/Button';
+import NavigationHeader from '@rn-ui-lib/components/NavigationHeader';
+import PressableChip from '@rn-ui-lib/components/PressableChip';
+import Text from '@rn-ui-lib/components/Text';
+import TextInput from '@rn-ui-lib/components/TextInput';
+import LineLoader from '@rn-ui-lib/components/suspense_loader/LineLoader';
+import SuspenseLoader from '@rn-ui-lib/components/suspense_loader/SuspenseLoader';
+import { GenericStyles } from '@rn-ui-lib/styles';
+import React, { useEffect } from 'react';
+import { Controller, useForm } from 'react-hook-form';
+import { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';
+import { createTicket, getDataForTicketCreation } from './actions';
+import { CreateTicketPayload } from './constant/types';
+
-const supportTypes = [
- {
- label: "Soft calling",
- value: "SOFT_CALLING"
- },
- {
- label: "Hard calling",
- value: "HARD_CALLING"
- },
- {
- label: "PTP follow up",
- value: "PTP_FOLLOW_UP"
- },
- {
- label: "Skip Tracing",
- value: "SKIP_TRACING"
- }
-];
const LoadingChips = () => {
@@ -44,7 +24,7 @@ const LoadingChips = () => {
{[...Array(5)].map((type, index) => (
@@ -138,7 +118,7 @@ const RequestSupport: React.FC = (props) => {
fallBack={}
>
- {supportTypes.map((type, index) => (
+ {data?.requestForm?.map((type, index) => (
= (props) => {
onSelectionChange={(meta, data) => onChange(data)}
checked={value === type.value}
meta={type.value}
- containerStyles={{margin:0}}
/>
)}
/>
@@ -173,7 +152,6 @@ const RequestSupport: React.FC = (props) => {
placeholder='Enter comments...'
onChangeText={onChange}
value={value}
- // Adjust other TextInput props as needed
/>
)}
/> }
@@ -216,6 +194,9 @@ const styles = StyleSheet.create({
textAlignVertical: 'top',
maxHeight: 100,
},
+ mv10:{
+ marginVertical:10
+ }
});
diff --git a/src/screens/cosmosSupport/TagComponent.tsx b/src/screens/cosmosSupport/TagComponent.tsx
index 3f8043ce..e82c7ce0 100644
--- a/src/screens/cosmosSupport/TagComponent.tsx
+++ b/src/screens/cosmosSupport/TagComponent.tsx
@@ -1,8 +1,7 @@
-import { StyleSheet, Text, View } from 'react-native'
-import React from 'react'
-import Tag, { TagVariant } from '@rn-ui-lib/components/Tag'
-import { COLORS } from '@rn-ui-lib/colors';
+import Tag, { TagVariant } from '@rn-ui-lib/components/Tag';
import { GenericStyles } from '@rn-ui-lib/styles';
+import React from 'react';
+import { View } from 'react-native';
interface ITagComponent {
text: string;
@@ -21,11 +20,6 @@ const TagComponent: React.FC = (props) => {
}
-const styles = StyleSheet.create({
- container: {
-
- }
-})
export default TagComponent;
\ No newline at end of file
diff --git a/src/screens/cosmosSupport/TaskForMe.tsx b/src/screens/cosmosSupport/TaskForMe.tsx
index 3e1d189a..77c6d2a8 100644
--- a/src/screens/cosmosSupport/TaskForMe.tsx
+++ b/src/screens/cosmosSupport/TaskForMe.tsx
@@ -5,7 +5,7 @@ import { ListRenderItemInfo, RefreshControl, View, VirtualizedList } from 'react
import { ListItemLoading } from './';
import CSAFilters from './CSAFilters';
import ListItem from './ListItem';
-import { SCREEN_MAP } from './constant';
+import { SCREEN_MAP, loadingData } from './constant';
import { useAppDispatch, useAppSelector } from '@hooks';
import { fetchTicketList } from './actions';
import { setCaseLevelTicketsForMe, setCaseLevelTicketsForMeLoading } from '@reducers/cosmosSupportSlice';
@@ -14,16 +14,13 @@ import Text from '@rn-ui-lib/components/Text';
import { From } from './ViewRequestHistory';
import { GetAllTicketFilters, GetAllTicketsPayload, IFilterStatus, Status } from './constant/types';
-// Define the item type
+
interface ListItem {
id: string;
text: string;
}
-const loadingData: ListItem[] = Array.from({ length: 10 }, (_, index) => ({
- id: index.toString(),
- text: `Item ${index + 1}`,
-}));
+
interface ITaskForMe {
route: {
@@ -121,14 +118,14 @@ const TaskForMe: React.FC = (props) => {
renderItem={apiCallInProgress ? renderItemLoadingState : renderItem}
getItemCount={getItemCount}
getItem={getItem}
- initialNumToRender={5} // Adjust as needed
- maxToRenderPerBatch={10} // Adjust as needed
- windowSize={10} // Adjust as needed
+ initialNumToRender={5}
+ maxToRenderPerBatch={10}
+ windowSize={10}
refreshControl={
}
ListEmptyComponent={() => (
diff --git a/src/screens/cosmosSupport/TeleSupport.tsx b/src/screens/cosmosSupport/TeleSupport.tsx
index 89f37aa9..54315efa 100644
--- a/src/screens/cosmosSupport/TeleSupport.tsx
+++ b/src/screens/cosmosSupport/TeleSupport.tsx
@@ -8,13 +8,12 @@ import { ListItemLoading } from './';
import CSAFilters from './CSAFilters';
import ListItem from './ListItem';
import { fetchTicketList } from './actions';
-import { SCREEN_MAP } from './constant';
+import { SCREEN_MAP, loadingData } from './constant';
import TaskForMeEmptyScreen from '@assets/icons/TaskForMeEmptyScreen';
import Text from '@rn-ui-lib/components/Text';
import { From } from './ViewRequestHistory';
import { GetAllTicketFilters, IFilterStatus, Status } from './constant/types';
-// Define the item type
interface ListItem {
id: string;
text: string;
@@ -32,14 +31,10 @@ interface ITaskForMe {
-const loadingData: ListItem[] = Array.from({ length: 10 }, (_, index) => ({
- id: index.toString(),
- text: `Item ${index + 1}`,
-}));
-// Define the component type
+
const TeleSupport: React.FC = (props) => {
const { from, route, lan, forScreen } = props;
@@ -54,7 +49,6 @@ const TeleSupport: React.FC = (props) => {
const [isRefreshing, setRefreshing] = useState(false);
const dispatch = useAppDispatch();
const onRefresh = () => {
- // Simulate a refresh process
loadData();
};
@@ -107,7 +101,6 @@ const TeleSupport: React.FC = (props) => {
};
const failureCallback = () => {
- console.log('failureCallback')
setRefreshing(false);
dispatch(setCaseLevelTicketsForTeleLoading(false));
};
@@ -130,19 +123,16 @@ const TeleSupport: React.FC = (props) => {
renderItem={apiCallInProgress ? renderItemLoadingState : renderItem}
getItemCount={getItemCount}
getItem={getItem}
- initialNumToRender={5} // Adjust as needed
- maxToRenderPerBatch={10} // Adjust as needed
- windowSize={10} // Adjust as needed
+ initialNumToRender={5}
+ maxToRenderPerBatch={10}
+ windowSize={10}
refreshControl={
}
- onEndReached={() => {
- //todo api call for next page
- }}
ListEmptyComponent={() => (
diff --git a/src/screens/cosmosSupport/TextFieldWithInput.tsx b/src/screens/cosmosSupport/TextFieldWithInput.tsx
index e2872eff..f09a58b3 100644
--- a/src/screens/cosmosSupport/TextFieldWithInput.tsx
+++ b/src/screens/cosmosSupport/TextFieldWithInput.tsx
@@ -25,6 +25,17 @@ const TextFieldWithInput: React.FC = (props) => {
}
}, [addingComment])
+ const onPress = () => {
+ if (!comment) {
+ Toast.show({
+ type: 'error',
+ text1: 'Comment is required',
+ })
+ return;
+ };
+ onPressSend(comment);
+ }
+
return (
= (props) => {
{
- if (!comment) {
- Toast.show({
- type: 'error',
- text1: 'Comment is required',
- })
- return;
- };
- onPressSend(comment)
- }}
+ onPress={onPress}
>
-
+
({
+ id: index.toString(),
+ text: `Item ${index + 1}`,
+}));
\ No newline at end of file