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