Skip to content

Commit

Permalink
fix: remove duplicate usage
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Nov 4, 2024
1 parent cf5d543 commit 97cc11f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions apps/ui/src/composables/useModal.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
const modalOpen = ref(false);
const modalAccountOpen = ref(false);
const modalTermsOpen = ref(false);
const modalAccountWithoutDismissOpen = ref(false);

function resetAccountModal() {
modalAccountOpen.value = false;
modalTermsOpen.value = false;
modalAccountWithoutDismissOpen.value = false;
}

export function useModal() {
return {
modalOpen,
modalAccountOpen,
modalTermsOpen,
modalAccountWithoutDismissOpen,
resetAccountModal
};
Expand Down
8 changes: 4 additions & 4 deletions apps/ui/src/views/Proposal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {
} = useVotingPower();
const { setTitle } = useTitle();
const { web3 } = useWeb3();
const { modalAccountOpen, modalTermsOpen } = useModal();
const { modalAccountOpen, modalOpen } = useModal();
const termStore = useTermStore();
const modalOpenVote = ref(false);
Expand Down Expand Up @@ -69,7 +69,7 @@ async function handleVoteClick(choice: Choice) {
props.space.additionalRawData?.terms &&
!termStore.isAccepted(props.space)
) {
modalTermsOpen.value = true;
modalOpen.value = true;
return;
}
Expand Down Expand Up @@ -362,9 +362,9 @@ watchEffect(() => {
<teleport to="#modal">
<ModalTerms
v-if="space.additionalRawData?.terms"
:open="modalTermsOpen"
:open="modalOpen"
:space="space"
@close="modalTermsOpen = false"
@close="modalOpen = false"
@accept="handleAcceptTerms"
/>
<ModalVote
Expand Down

0 comments on commit 97cc11f

Please sign in to comment.