Skip to content

Commit

Permalink
feat: lender profile link added to my kiva nav (#5675)
Browse files Browse the repository at this point in the history
* feat: lender profile link added to my kiva nav

* fix: withdraw link fixed
  • Loading branch information
roger-in-kiva authored Nov 12, 2024
1 parent 38eb8e8 commit e7abcc9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/components/MyKiva/MyKivaNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,22 @@
<script setup>
import { mdiClose } from '@mdi/js';
import KvMaterialIcon from '@kiva/kv-components/vue/KvMaterialIcon';
import { ref, toRefs, watch } from 'vue';
import {
ref,
toRefs,
watch,
computed,
} from 'vue';
const props = defineProps({
visible: {
type: Boolean,
default: false,
},
userInfo: {
type: Object,
default: () => ({}),
},
userBalance: {
type: String,
default: '',
Expand All @@ -144,7 +153,11 @@ const props = defineProps({
const emit = defineEmits(['navigation-closed']);
const { visible, userBalance } = toRefs(props);
const { visible, userInfo, userBalance } = toRefs(props);
const publicId = computed(() => {
return userInfo.value?.userAccount?.publicId ?? '';
});
const open = ref(false);
const profileSettingsOptions = ref([
Expand All @@ -153,13 +166,14 @@ const profileSettingsOptions = ref([
{ link: '/settings/email', text: 'Email' },
{ link: '/settings/payments', text: 'Payment methods' },
{ link: '/settings/data', text: 'Data' },
{ link: `/lender/${publicId.value}`, text: 'Public lender profile' },
]);
const lendingOptions = ref([
{ link: '/portfolio/loans', text: 'My loans' },
{ link: '/portfolio/lending-stats', text: 'Lending stats' },
{ link: '/portfolio/estimated-repayments', text: 'Estimated repayments' },
{ link: '/portfolio/credit/deposit', text: 'Add credit' },
{ link: '/portfolio/withdraw', text: 'Withdraw' },
{ link: '/withdraw', text: 'Withdraw' },
{ link: '/donate/supportusprocess', text: 'Donate credit', isDonate: true },
{ link: '/portfolio/donations', text: 'My donations' },
{ link: '/portfolio/transactions', text: 'Transaction history' },
Expand Down
1 change: 1 addition & 0 deletions src/graphql/query/myKiva.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ query myKivaQuery {
}
userAccount {
id
publicId
firstName
lastName
balance
Expand Down
1 change: 1 addition & 0 deletions src/pages/Portfolio/MyKiva/MyKivaPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<www-page main-class="tw-bg-secondary tw-overflow-hidden tw-relative" class="tw-relative">
<MyKivaNavigation
:visible="showNavigation"
:user-info="userInfo"
:user-balance="userBalance"
@navigation-closed="showNavigation = false"
/>
Expand Down

0 comments on commit e7abcc9

Please sign in to comment.