mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
fix(AboutSettings): don't throw a notification when switch to the about page (#7688)
refactor(AboutSettings): streamline test channel change handling - Moved the test channel change logic into a dedicated function to improve clarity and maintainability. - Removed the useEffect hook that was previously monitoring changes, simplifying the component's structure.
This commit is contained in:
parent
6c0b614208
commit
01fc98b221
@ -102,13 +102,10 @@ const AboutSettings: FC = () => {
|
||||
{ pattern: `-${UpgradeChannel.RC}.`, channel: UpgradeChannel.RC }
|
||||
].find(({ pattern }) => version.includes(pattern))?.channel || UpgradeChannel.LATEST
|
||||
|
||||
useEffect(() => {
|
||||
if (testPlan && currentChannelByVersion !== UpgradeChannel.LATEST && testChannel !== currentChannelByVersion) {
|
||||
const handleTestChannelChange = async (value: UpgradeChannel) => {
|
||||
if (testPlan && currentChannelByVersion !== UpgradeChannel.LATEST && value !== currentChannelByVersion) {
|
||||
window.message.warning(t('settings.general.test_plan.version_channel_not_match'))
|
||||
}
|
||||
}, [testPlan, testChannel, currentChannelByVersion, t])
|
||||
|
||||
const handleTestChannelChange = async (value: UpgradeChannel) => {
|
||||
setTestChannel(value)
|
||||
// Clear update info when switching upgrade channel
|
||||
dispatch(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user