From f3ad4d576e6093832958eab0df51cae793e6b4f6 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Fri, 14 Jul 2023 18:42:28 +0100 Subject: [PATCH] card list image added --- src/components/Settings/Tabs/CardList.jsx | 58 ++++++++++--------- .../Settings/Tabs/PaymentMathodsTab.jsx | 14 ----- src/components/Settings/index.jsx | 2 +- 3 files changed, 33 insertions(+), 41 deletions(-) diff --git a/src/components/Settings/Tabs/CardList.jsx b/src/components/Settings/Tabs/CardList.jsx index c08ca0f..a6139dc 100644 --- a/src/components/Settings/Tabs/CardList.jsx +++ b/src/components/Settings/Tabs/CardList.jsx @@ -1,6 +1,8 @@ import React, {useEffect, useState} from 'react' -import method1 from "../../../assets/images/payment-method-1.png"; +import method1 from "../../../assets/images/payment-cards/discover-card.svg"; import LoadingSpinner from '../../Spinners/LoadingSpinner'; +import localImgLoad from '../../../lib/localImgLoad'; + import usersService from "../../../services/UsersService"; import { handlePagingFunc } from '../../Pagination'; import PaginatedList from '../../Pagination/PaginatedList'; @@ -21,6 +23,7 @@ function CardList() { useEffect(()=>{ api.payListCard().then(res=>{ + console.log('TESTING', res.data?.result_list) setCardList({loading: false, data:res.data?.result_list}) }).catch(err => { setCardList({loading: false, data:[]}) @@ -36,34 +39,37 @@ function CardList() { : cardList.data.length ? - currentCardList.map(item =>( -
  • -
    -
    - payment + currentCardList.map(item =>{ + let image = item.description && localImgLoad(`images/payment-cards/${item.description.toLowerCase()}-card.svg`) + return( +
  • +
    +
    + payment +
    +
    +

    + Added: {item.added} +

    +

    + {item.description} **********{item.digits} +

    + {/*

    + Verified +

    */} +
    -

    - Added: {item.added} -

    -

    - {item.description} **********{item.digits} -

    - {/*

    - Verified -

    */} +
    - -
    - -
    -
  • - )) + + )} + ) :

    No Cards Found

    } diff --git a/src/components/Settings/Tabs/PaymentMathodsTab.jsx b/src/components/Settings/Tabs/PaymentMathodsTab.jsx index 540aa2d..e58e8ac 100644 --- a/src/components/Settings/Tabs/PaymentMathodsTab.jsx +++ b/src/components/Settings/Tabs/PaymentMathodsTab.jsx @@ -12,20 +12,6 @@ export default function PaymentMathodsTab() {
    -
    - - -
    diff --git a/src/components/Settings/index.jsx b/src/components/Settings/index.jsx index b96e6a7..64917b7 100644 --- a/src/components/Settings/index.jsx +++ b/src/components/Settings/index.jsx @@ -58,7 +58,7 @@ export default function Settings({ faq }) { { id: 2, name: "payment", - title: "Payment Method", + title: "Payment Cards", iconName: "bank-card", }, { -- 2.34.1