Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable appreciation mode button when there are no appreciation items #642

Merged
merged 3 commits into from
Feb 27, 2025

Conversation

MakinoharaShoko
Copy link
Member

Fixes #641

Disable the appreciation mode button when there are no appreciation items.

  • Add a check for appreciation items in packages/webgal/src/UI/Title/Title.tsx using useSelector to determine if there are any appreciation items.
  • Modify the appreciation mode button to include a disabled attribute and a conditional class for when there are no appreciation items.
  • Update the styles in packages/webgal/src/UI/Title/title.module.scss to include a new class for the disabled state of the appreciation mode button.

Fixes #641

Disable the appreciation mode button when there are no appreciation items.

* Add a check for appreciation items in `packages/webgal/src/UI/Title/Title.tsx` using `useSelector` to determine if there are any appreciation items.
* Modify the appreciation mode button to include a `disabled` attribute and a conditional class for when there are no appreciation items.
* Update the styles in `packages/webgal/src/UI/Title/title.module.scss` to include a new class for the disabled state of the appreciation mode button.
Copy link

cloudflare-workers-and-pages bot commented Feb 15, 2025

Deploying webgal-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: 24d731b
Status: ✅  Deploy successful!
Preview URL: https://f8ed6be2.webgal-dev.pages.dev
Branch Preview URL: https://makinoharashoko-disable-appr.webgal-dev.pages.dev

View logs

@MakinoharaShoko MakinoharaShoko changed the base branch from main to dev February 27, 2025 13:43
@MakinoharaShoko MakinoharaShoko merged commit fcfe77b into dev Feb 27, 2025
2 checks passed
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.

在没有鉴赏项目时将鉴赏模式的按钮设为不可点击(disabled)
1 participant