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

🐛fix air conditioner sound can't turning off completely & use valtio instead of context #162

Closed
wants to merge 8 commits into from

Conversation

boyfeiyu
Copy link
Contributor

#152
修复了152issue提到的独立遥控器和主页面的遥控器控制声音不同步的问题
思路是将播放声音的组件放在空调内部,并且状态抽取到Context中进行管理。
如果是在独立遥控器触发开关,通过监听storage来通知空调播放声音。

前端新手,云游大大您看这样做是否合理qaq

@vercel
Copy link

vercel bot commented Nov 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
air-conditioner ✅ Ready (Inspect) Visit Preview Nov 29, 2022 at 9:54AM (UTC)

@netlify
Copy link

netlify bot commented Nov 25, 2022

Deploy Preview for air-conditioner ready!

Name Link
🔨 Latest commit a87ec3b
🔍 Latest deploy log https://app.netlify.com/sites/air-conditioner/deploys/6385d6af9f4a6c0009e5b4f0
😎 Deploy Preview https://deploy-preview-162--air-conditioner.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

src/main.tsx Outdated Show resolved Hide resolved
src/context/sound.tsx Outdated Show resolved Hide resolved
@boyfeiyu
Copy link
Contributor Author

集成了Valtio作为状态管理的方案

@boyfeiyu boyfeiyu changed the title 🐛fix air conditioner sound can't turning off completely 🐛fix air conditioner sound can't turning off completely & use valtio instead of context Nov 28, 2022
src/store/toast.ts Outdated Show resolved Hide resolved
src/store/ac.ts Outdated Show resolved Hide resolved
src/store/ac.ts Outdated Show resolved Hide resolved
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.

2 participants