link error isued fixed

This commit was merged in pull request #16.
This commit is contained in:
victorAnumudu
2025-09-29 18:36:10 +01:00
parent 4481dae24e
commit ec1402f610
7 changed files with 88 additions and 30 deletions
@@ -14,12 +14,12 @@ import CustomerPaymentsView from "./CustomerPaymentsView";
export default function AccountViewCom() {
const {state:{memberUID}} = useLocation()
const {state} = useLocation()
const navigate = useNavigate()
useEffect(()=>{
if(!memberUID){
navigate(RouteLinks.customerPage, {replace: true})
if(!state?.memberUID){
navigate(RouteLinks.homePage, {replace: true})
}
},[])
@@ -28,7 +28,7 @@ export default function AccountViewCom() {
queryFn: () => {
// const filterData = filter?.type ? {[filter?.type]: filter.id} : {}
const reqData = {
member_uid: memberUID
member_uid: state?.memberUID
// page,
// ...filterData
}
@@ -45,7 +45,7 @@ export default function AccountViewCom() {
return (
<div className='w-full flex flex-col gap-8'>
<BreadcrumbCom title={`Account View [${memberUID}]`} paths={['Dashboard', 'Account View']}/>
<BreadcrumbCom title={`Account View [${state?.memberUID}]`} paths={['Dashboard', 'Account View']}/>
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
{isFetching ?
@@ -58,7 +58,7 @@ export default function AccountViewCom() {
<>
<CustomerAccountView accountInfo={account_info} />
<AccountProfileView profile={account_profile} />
<CustomerSubscriptionsView subscriptions={subscriptions} memberUID={memberUID} />
<CustomerSubscriptionsView subscriptions={subscriptions} />
<CustomerPaymentsView payments={payments} />
</>