forked from mirror/chinese-colors
feat: update currColor when currSet changed
This commit is contained in:
parent
0114d35366
commit
9c3f9aba04
@ -63,7 +63,7 @@ const useColor = initialValue => {
|
||||
if (payload.name == '') {
|
||||
cs.colors = JSON.parse(localStorage.getItem('FAV_COLORS') || '[]');
|
||||
}
|
||||
return { ...state, currSet: cs };
|
||||
return { ...state, currSet: cs, currColor: cs.colors[0] };
|
||||
}
|
||||
default:
|
||||
throw new Error();
|
||||
|
Loading…
Reference in New Issue
Block a user