Skip to content

Commit

Permalink
refactor: unnecessary userId variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bedon committed Nov 22, 2023
1 parent 4cd08df commit c4b2508
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions @kiva/kv-components/vue/KvWwwHeader/LendMenu/KvLendMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

<script>
import { gql } from '@apollo/client/core';
import { computed, onMounted, ref } from 'vue-demi';
import {
computed, onMounted, ref, toRefs,
} from 'vue-demi';
import KvLendListMenu from './KvLendListMenu.vue';
import KvLendMegaMenu from './KvLendMegaMenu.vue';
import { indexIn } from '../../../utils/comparators';
Expand All @@ -38,7 +40,10 @@ export default {
},
emits: ['load-lend-menu-data'],
setup(props, { emit }) {
const userId = ref(props.userId);
const {
userId,
} = toRefs(props);
const categories = ref([]);
const countryFacets = ref([]);
const favoritesCount = ref(0);
Expand Down Expand Up @@ -124,7 +129,7 @@ export default {
}
`,
variables: {
userId: userId.value,
userId,
},
fetchPolicy: 'network-only',
});
Expand Down

0 comments on commit c4b2508

Please sign in to comment.