diff --git a/frontend/src/components/Chip/Chip.styles.js b/frontend/src/components/Chip/Chip.styles.js index 442c7bb47..07ceb7718 100644 --- a/frontend/src/components/Chip/Chip.styles.js +++ b/frontend/src/components/Chip/Chip.styles.js @@ -6,7 +6,8 @@ const Container = styled.div` width: ${({ width }) => (width ? width : 'fit-content')}; max-width: ${({ maxWidth }) => maxWidth}; background-color: ${({ backgroundColor }) => backgroundColor ?? COLOR.LIGHT_GRAY_200}; - color: ${({ backgroundColor }) => getTextColor(backgroundColor) ?? COLOR.BLACK_900}; + color: ${({ backgroundColor }) => + backgroundColor ? getTextColor(backgroundColor) : COLOR.BLACK_900}; padding: 0.2rem 0.8rem; border-radius: 5rem; margin-right: 1rem; diff --git a/frontend/src/components/NavBar/NavBar.js b/frontend/src/components/NavBar/NavBar.js index f70520cd3..9000646cd 100644 --- a/frontend/src/components/NavBar/NavBar.js +++ b/frontend/src/components/NavBar/NavBar.js @@ -53,9 +53,8 @@ const NavBar = () => { } }, [user]); - const goMainWithReload = () => { + const goMain = () => { history.push(PATH.ROOT); - window.location.reload(); }; const goNewPost = async () => { @@ -124,7 +123,7 @@ const NavBar = () => { return ( - + PROLOG 로고 {process.env.REACT_APP_MODE === 'PROD' ? 'BETA' : process.env.REACT_APP_MODE} diff --git a/frontend/src/utils/textColorPicker.js b/frontend/src/utils/textColorPicker.js index 197b64d85..10816e9f3 100644 --- a/frontend/src/utils/textColorPicker.js +++ b/frontend/src/utils/textColorPicker.js @@ -1,6 +1,10 @@ import { COLOR } from '../constants'; function getTextColor(hexColor) { + if (!hexColor) { + return `${COLOR.BLACK_900}`; + } + const rgb = parseInt(hexColor.substring(1), 16); const r = (rgb >> 16) & 0xff;