learnmore bug fixed
This commit is contained in:
+43
-43
@@ -31,50 +31,50 @@ import InviteRefer from './views/InviteRefer';
|
||||
import MyRefer from './views/MyRefer';
|
||||
|
||||
|
||||
const HomePages = lazy(() => import("./views/HomePages"));
|
||||
const ScrollToTop = lazy(() => import("./components/Helpers/ScrollToTop"));
|
||||
const StartJob = lazy(() => import("./components/MyJobs/StartJob"));
|
||||
const Notification = lazy(() => import("./components/Notification"));
|
||||
const AuthRoute = lazy(() => import("./middleware/AuthRoute"));
|
||||
const AuthProfilePage = lazy(() => import("./views/AuthProfilePage"));
|
||||
const BlogPage = lazy(() => import("./views/BlogPage"));
|
||||
const FamilyManagePage = lazy(() => import("./views/FamilyManagePage"));
|
||||
const FamilyMarketPage = lazy(() => import("./views/FamilyMarketPage"));
|
||||
import HomePages from "./views/HomePages"
|
||||
import ScrollToTop from "./components/Helpers/ScrollToTop"
|
||||
import StartJob from "./components/MyJobs/StartJob"
|
||||
import Notification from "./components/Notification"
|
||||
import AuthRoute from "./middleware/AuthRoute"
|
||||
import AuthProfilePage from "./views/AuthProfilePage"
|
||||
import BlogPage from "./views/BlogPage"
|
||||
import FamilyManagePage from "./views/FamilyManagePage"
|
||||
import FamilyMarketPage from "./views/FamilyMarketPage"
|
||||
|
||||
const HistoryPage = lazy(()=> import("./views/HistoryPage"));
|
||||
const JobGroupsPage = lazy(()=> import("./views/JobGroupsPage"));
|
||||
const ManageActiveJobs = lazy(()=> import("./views/ManageActiveJobs"));
|
||||
const ManageInterestOfferPage = lazy(()=> import("./views/ManageInterestOfferPage"));
|
||||
const MarketPlacePage = lazy(()=> import("./views/MarketPlacePage"));
|
||||
const MyActiveJobsPage = lazy(()=> import("./views/MyActiveJobsPage"));
|
||||
const MyCouponPage = lazy(()=> import("./views/MyCouponPage"));
|
||||
const MyJobsPage = lazy(()=> import("./views/MyJobsPage"));
|
||||
const MyOffersPage = lazy(()=> import("./views/MyOffersPage"));
|
||||
const MyPastDueJobsPage = lazy(()=> import("./views/MyPastDueJobsPage"));
|
||||
const MyReviewDueJobsPage = lazy(()=> import("./views/MyReviewDueJobsPage"));
|
||||
const MyTaskPage = lazy(()=> import("./views/MyTaskPage"));
|
||||
const MyWaitingJobsPage = lazy(()=> import("./views/MyWaitingJobsPage"));
|
||||
const MyWalletPage = lazy(()=> import("./views/MyWalletPage"));
|
||||
const OffersInterestPage = lazy(()=> import("./views/OffersInterestPage"));
|
||||
const ReferralPage = lazy(()=> import("./views/ReferralPage"));
|
||||
const RemindersPage = lazy(()=> import("./views/RemindersPage"));
|
||||
const ResourcePage = lazy(()=> import("./views/ResourcePage"));
|
||||
const SettingsPage = lazy(()=> import("./views/SettingsPage"));
|
||||
const TrackingPage = lazy(()=> import("./views/TrackingPage"));
|
||||
const UploadProductPage = lazy(()=> import("./views/UploadProductPage"));
|
||||
const UserProfilePage = lazy(()=> import("./views/UserProfilePage"));
|
||||
const YourPages = lazy(()=> import("./views/YourPage_"));
|
||||
const ParentWaitingPage = lazy(()=> import("./views/ParentWaitingPage"));
|
||||
const FamilyPendingOfferPage = lazy(()=> import("./views/FamilyPendingOfferPage"));
|
||||
const FamBlogPage = lazy(()=> import("./views/FamBlogPage"));
|
||||
const FamAIQuestionPage = lazy(()=> import("./views/FamAIQuestionPage"));
|
||||
const FamMyFilesPage = lazy(()=> import("./views/FamMyFilesPage"));
|
||||
const FamWorkInProgressPage = lazy(()=> import("./views/FamWorkInProgressPage"));
|
||||
const MyPastDueTasksPage = lazy(()=> import("./views/MyPastDueTasksPage"));
|
||||
const FamilyWalletPage = lazy(()=> import("./views/FamilyWalletPage"));
|
||||
const LearnMorePage = lazy(()=> import("./views/LearnMorePage"));
|
||||
const FamGamesPage = lazy(()=> import("./views/FamGamesPage"));
|
||||
const FamilyRoutesPage = lazy(()=> import("./views/FamilyRoutesPage"));
|
||||
import HistoryPage from "./views/HistoryPage"
|
||||
import JobGroupsPage from "./views/JobGroupsPage"
|
||||
import ManageActiveJobs from "./views/ManageActiveJobs"
|
||||
import ManageInterestOfferPage from "./views/ManageInterestOfferPage"
|
||||
import MarketPlacePage from "./views/MarketPlacePage"
|
||||
import MyActiveJobsPage from "./views/MyActiveJobsPage"
|
||||
import MyCouponPage from "./views/MyCouponPage"
|
||||
import MyJobsPage from "./views/MyJobsPage"
|
||||
import MyOffersPage from "./views/MyOffersPage"
|
||||
import MyPastDueJobsPage from "./views/MyPastDueJobsPage"
|
||||
import MyReviewDueJobsPage from "./views/MyReviewDueJobsPage"
|
||||
import MyTaskPage from "./views/MyTaskPage"
|
||||
import MyWaitingJobsPage from "./views/MyWaitingJobsPage"
|
||||
import MyWalletPage from "./views/MyWalletPage"
|
||||
import OffersInterestPage from "./views/OffersInterestPage"
|
||||
import ReferralPage from "./views/ReferralPage"
|
||||
import RemindersPage from "./views/RemindersPage"
|
||||
import ResourcePage from "./views/ResourcePage"
|
||||
import SettingsPage from "./views/SettingsPage"
|
||||
import TrackingPage from "./views/TrackingPage"
|
||||
import UploadProductPage from "./views/UploadProductPage"
|
||||
import UserProfilePage from "./views/UserProfilePage"
|
||||
import YourPages from "./views/YourPage_"
|
||||
import ParentWaitingPage from "./views/ParentWaitingPage"
|
||||
import FamilyPendingOfferPage from "./views/FamilyPendingOfferPage"
|
||||
import FamBlogPage from "./views/FamBlogPage"
|
||||
import FamAIQuestionPage from "./views/FamAIQuestionPage"
|
||||
import FamMyFilesPage from "./views/FamMyFilesPage"
|
||||
import FamWorkInProgressPage from "./views/FamWorkInProgressPage"
|
||||
import MyPastDueTasksPage from "./views/MyPastDueTasksPage"
|
||||
import FamilyWalletPage from "./views/FamilyWalletPage"
|
||||
import LearnMorePage from "./views/LearnMorePage"
|
||||
import FamGamesPage from "./views/FamGamesPage"
|
||||
import FamilyRoutesPage from "./views/FamilyRoutesPage"
|
||||
|
||||
export default function Routers() {
|
||||
return (
|
||||
|
||||
@@ -39,7 +39,7 @@ function AddJob({ popUpHandler, categories }) {
|
||||
|
||||
try {
|
||||
const res = await ApiCall.jobManagerCreateJob(reqData);
|
||||
if (res.data.internal_return < 1) {
|
||||
if (res?.data?.internal_return < 1) {
|
||||
setRequestStatus({
|
||||
loading: false,
|
||||
status: false,
|
||||
@@ -75,7 +75,7 @@ function AddJob({ popUpHandler, categories }) {
|
||||
// For form initial values
|
||||
const initialValues = {
|
||||
// initial values for formik
|
||||
country: walletDetails.data.length === 1 ? walletDetails.data[0].country : '',
|
||||
country: walletDetails?.data?.length === 1 ? walletDetails.data[0].country : '',
|
||||
price: "",
|
||||
title: "",
|
||||
description: "",
|
||||
@@ -117,18 +117,18 @@ function AddJob({ popUpHandler, categories }) {
|
||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
||||
onChange={props.handleChange}
|
||||
onBlur={props.handleBlur}
|
||||
disabled={walletDetails.data.length === 1}
|
||||
disabled={walletDetails?.data?.length === 1}
|
||||
>
|
||||
{walletDetails?.loading ? (
|
||||
<option className="text-slate-500 text-lg" value="">
|
||||
Loading...
|
||||
</option>
|
||||
) : walletDetails.data.length > 1 ? (
|
||||
) : walletDetails?.data?.length > 1 ? (
|
||||
<>
|
||||
<option className="text-slate-500 text-lg" value="">
|
||||
Select a currency
|
||||
</option>
|
||||
{walletDetails.data?.map((item, index) => (
|
||||
{walletDetails?.data?.map((item, index) => (
|
||||
<option
|
||||
key={index}
|
||||
className="text-slate-500 text-lg"
|
||||
@@ -138,9 +138,9 @@ function AddJob({ popUpHandler, categories }) {
|
||||
</option>
|
||||
))}
|
||||
</>
|
||||
) : walletDetails.data.length === 1 ?
|
||||
) : walletDetails?.data?.length === 1 ?
|
||||
<>
|
||||
{walletDetails.data?.map((item, index) => (
|
||||
{walletDetails?.data?.map((item, index) => (
|
||||
<option
|
||||
key={index}
|
||||
className="text-slate-500 text-lg"
|
||||
|
||||
@@ -66,17 +66,17 @@ export default function LearnMore() {
|
||||
})
|
||||
|
||||
//FUNCTION TO GET LEARN MORE TOPIC
|
||||
|
||||
useEffect(()=>{
|
||||
apiCall.getLearnmoreTopics().then((res)=>{
|
||||
if(res.data.internal_return < 0){ // success but no data
|
||||
setTopics(prev => ({...prev, loading: false}))
|
||||
return
|
||||
}
|
||||
const resData = res?.data?.result_list
|
||||
const resData = res?.data?.result_list || []
|
||||
console.log('resData', resData)
|
||||
setTopics(prev => ({...prev, loading: false, data: resData}))
|
||||
setTabs(prev => {
|
||||
return prev.map((item, index) => ({...item, title:resData[index].topic}))
|
||||
return prev?.map((item, index) => ({...item, title:resData[index]?.topic}))
|
||||
})
|
||||
setSelectedTab(resData[0].topic)
|
||||
// console.log('RES', resData)
|
||||
@@ -130,7 +130,7 @@ export default function LearnMore() {
|
||||
<>
|
||||
{(topics?.data && topics?.data?.length > 0) ?
|
||||
<div dangerouslySetInnerHTML={{
|
||||
__html: topics?.data?.filter(item => item.topic == selectedTab)[0]?.contents,
|
||||
__html: topics?.data?.filter(item => item?.topic == selectedTab)[0]?.contents,
|
||||
}} className='prose dark:text-white dark:bg-dark-white'
|
||||
>
|
||||
{/* {topics?.data?.filter(item => item.topic == selectedTab)[0]?.contents} */}
|
||||
|
||||
@@ -1674,7 +1674,7 @@ class usersService {
|
||||
}
|
||||
|
||||
postAuxEnd(uri, reqData, uploadPost=false) {
|
||||
const endPoint = uploadPost ? process.env.REACT_APP_MEDIA_LINK + uri : process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||
const endPoint = uploadPost ? process.env.REACT_APP_MEDIA_LINK + uri : 'https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1' + uri;
|
||||
const session_token = localStorage.getItem("session_token");
|
||||
// session_token = session_token !=null ?session_token : '';
|
||||
// 'Authorization': `Basic ${(session_token !=null) ?session_token : ''}`,
|
||||
|
||||
Reference in New Issue
Block a user