Fix-Crash on Entering Primary Color Hex Code without # Prefix

This commit is contained in:
Aadhar Chandiwala
2022-03-17 19:42:26 +05:30
parent 5fa45ef5bd
commit dac4e862b8

View File

@ -19,6 +19,9 @@ const Theme = () => {
const { background, text, primary } = useAppSelector<ThemeType>((state) => get(state.resume, 'metadata.theme'));
const handleChange = (property: string, color: string) => {
if (color[0] !== '#') {
color = `#${color}`;
}
dispatch(setResumeState({ path: `metadata.theme.${property}`, value: color }));
};