fixed dashboard payments endpoint
This commit was merged in pull request #78.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { memo, useMemo, useState } from 'react'
|
||||
import GeneralTab from './GeneralTab'
|
||||
import { getSettingsData } from '../../../services/services';
|
||||
import { getSettingsData, getMyProductConfig } from '../../../services/services';
|
||||
import queryKeys from '../../../services/queryKeys';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
@@ -8,6 +8,20 @@ import { useQuery } from '@tanstack/react-query';
|
||||
const Settings = memo(({productData}) => {
|
||||
|
||||
const { userDetails: { uid }} = useSelector((state) => state?.userDetails); // GETS USER UID
|
||||
|
||||
const {data:configData, isFetching:configIsFetching, configIsError, error:configError} = useQuery({
|
||||
queryKey: queryKeys.myProductConfig,
|
||||
queryFn: () => {
|
||||
let reqData = {
|
||||
token: localStorage.getItem('token'), // USER TOKEN
|
||||
uid: localStorage.getItem('uid'), // USER UID
|
||||
product_id: productData?.product_id
|
||||
}
|
||||
return getMyProductConfig(reqData)
|
||||
}
|
||||
})
|
||||
const settingsConfig = configData?.data?.settings_items
|
||||
// console.log('CONFIG DATA...', settingsConfig)
|
||||
|
||||
const dataFields ={
|
||||
site_title: { name: 'Title', controls: 'TEXT', active: true },
|
||||
|
||||
@@ -44,7 +44,7 @@ const SiteTemplateSelector = memo(({name='Full Name', data, productData}) =>{
|
||||
:
|
||||
<div className="row">
|
||||
<>
|
||||
{!templates.length ?
|
||||
{!templates?.length ?
|
||||
<p>No data Found</p>
|
||||
:
|
||||
templates.map(template => (
|
||||
|
||||
Reference in New Issue
Block a user