Skip to content

Use vueuse useToggle instead of local composable#154

Open
mirumodapon wants to merge 1 commit into
mainfrom
refactor/popup
Open

Use vueuse useToggle instead of local composable#154
mirumodapon wants to merge 1 commit into
mainfrom
refactor/popup

Conversation

@mirumodapon
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 17, 2026 07:44
@rileychh-dokploy-coscup
Copy link
Copy Markdown

rileychh-dokploy-coscup Bot commented May 17, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ✅ Done Preview URL 2026-05-17T07:46:54.458Z

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the project’s local useToggle composable and switches CpPopup to use useToggle from @vueuse/core, reducing duplicated utility code and standardizing on VueUse helpers already in use.

Changes:

  • Deleted app/composables/useToggle.ts (local toggle composable).
  • Updated CpPopup.vue to import and use useToggle from @vueuse/core, including a close helper and click handler wiring.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app/composables/useToggle.ts Removes the local toggle composable in favor of VueUse’s implementation.
app/components/shared/CpPopup.vue Replaces local toggle usage with @vueuse/core’s useToggle and adjusts click/close behavior accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 20 to 22
name="trigger"
@click="toggle"
@click="() => toggle()"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants