mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
Update DropdownReflexer.vue
This commit is contained in:
parent
62333c5f51
commit
0670715351
|
@ -23,7 +23,9 @@
|
||||||
|
|
||||||
<template #menu="{ close }">
|
<template #menu="{ close }">
|
||||||
<dropdown-menu style="width: 240px; max-height: 440px">
|
<dropdown-menu style="width: 240px; max-height: 440px">
|
||||||
<div class="flex flex-col overflow-x-hidden overflow-y-auto scrollbar-hover scrollbar">
|
<div
|
||||||
|
class="flex flex-col overflow-x-hidden overflow-y-auto scrollbar-hover scrollbar"
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
v-for="safe in safes"
|
v-for="safe in safes"
|
||||||
:key="safe.id"
|
:key="safe.id"
|
||||||
|
@ -70,12 +72,18 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { safeId, safes, selectSafe, isNewSafe } = useReflexerPosition()
|
const { safeId, safes, selectSafe, isNewSafe, safeType, safeTypes } = useReflexerPosition()
|
||||||
const { back } = useSidebar()
|
const { back } = useSidebar()
|
||||||
|
|
||||||
function openNewSafe(cb) {
|
function openNewSafe(cb) {
|
||||||
router.push({ hash: 'collateral' })
|
if (safeTypes.value.length === 1) {
|
||||||
|
safeType.value = safeTypes.value[0].type;
|
||||||
|
isNewSafe.value = true;
|
||||||
|
router.push({ hash: "supply" });
|
||||||
|
} else {
|
||||||
|
router.push({ hash: "collateral" });
|
||||||
|
}
|
||||||
|
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user