Skip to content

Commit

Permalink
feat: bp activity fead code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
roger-in-kiva committed Nov 25, 2024
1 parent 3732f90 commit 8c44106
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 483 deletions.
26 changes: 0 additions & 26 deletions .storybook/stories/KvActivityRow.stories.js

This file was deleted.

67 changes: 0 additions & 67 deletions .storybook/stories/KvLoanActivities.stories.js

This file was deleted.

59 changes: 25 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
"@godaddy/terminus": "^4.11.0",
"@graphql-tools/load": "^7.7.0",
"@graphql-tools/url-loader": "^7.17.18",
"@kiva/kv-components": "^3.109.1",
"@kiva/kv-components": "^3.109.3",
"@kiva/kv-shop": "^1.12.65",
"@kiva/kv-tokens": "^2.15.0",
"@mdi/js": "^7",
"@mdi/js": "^7.4.47",
"@opentelemetry/api": "^1.7.0",
"@opentelemetry/auto-instrumentations-node": "^0.40.2",
"@opentelemetry/exporter-metrics-otlp-proto": "^0.46.0",
Expand Down
36 changes: 1 addition & 35 deletions src/components/BorrowerProfile/LendCta.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,24 +256,6 @@
data-testid="bp-lend-cta-jump-links"
/>
</div>
<div v-if="!!activities && !isSticky">
<hr
class="tw-block tw-border-tertiary tw-w-full tw-my-2"
>
<supported-by-lenders
:participants="participants"
/>
<kv-loan-activities
class="tw-w-full"
:loan="loan"
:activities="activities"
:basket-items="basketItems"
:user-balance="userBalance"
:error-msg="errorMsg"
:is-adding="isAdding"
@add-to-basket="addToBasket"
/>
</div>
</div>
</kv-grid>

Expand Down Expand Up @@ -393,8 +375,6 @@ import LendAmountButton from '#src/components/LoanCards/Buttons/LendAmountButton
import CompleteLoanWrapper from '#src/components/BorrowerProfile/CompleteLoanWrapper';
import KvIcon from '#src/components/Kv/KvIcon';
import KvLoanActivities from '#src/components/Kv/KvLoanActivities';
import SupportedByLenders from '#src/components/BorrowerProfile/SupportedByLenders';
import KvUiSelect from '#kv-components/KvSelect';
import KvMaterialIcon from '#kv-components/KvMaterialIcon';
import KvUiButton from '#kv-components/KvButton';
Expand All @@ -413,10 +393,6 @@ export default {
type: Boolean,
default: false,
},
activities: {
type: Object,
default: null,
},
enableHugeAmount: {
type: Boolean,
default: false,
Expand All @@ -436,8 +412,6 @@ export default {
JumpLinks,
LoanBookmark,
CompleteLoanWrapper,
KvLoanActivities,
SupportedByLenders,
},
data() {
return {
Expand Down Expand Up @@ -575,11 +549,7 @@ export default {
},
},
methods: {
async addToBasket(lendAmount = 0) {
if (lendAmount) {
this.$kvTrackEvent('Borrower profile', 'click', 'loan-activities-lend', this.loan?.id, lendAmount);
}
async addToBasket() {
if (this.teamData?.id) {
const challenge = {
teamId: this.teamData.id,
Expand All @@ -591,7 +561,6 @@ export default {
this.isAdding = true;
this.errorMsg = '';
this.selectedOption = Number(lendAmount) || this.selectedOption;
setLendAmount({
amount: isLessThan25(this.unreservedAmount) ? this.unreservedAmount : this.selectedOption,
apollo: this.apollo,
Expand Down Expand Up @@ -866,9 +835,6 @@ export default {
isLendAmountButton() {
return (this.lendButtonVisibility || this.state === 'lent-to') && (isLessThan25(this.unreservedAmount)); // eslint-disable-line max-len
},
participants() {
return this.activities?.lend?.loan?.lendingActions ?? {};
}
},
mounted() {
this.createWrapperObserver();
Expand Down
33 changes: 0 additions & 33 deletions src/components/Kv/KvActivityRow.vue

This file was deleted.

Loading

0 comments on commit 8c44106

Please sign in to comment.