Skip to content

Commit

Permalink
refactor: 상수 파일 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
GC-Park committed May 18, 2023
1 parent 039a69b commit 89a3df7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/NavBar/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
} from './NavBar.styles';
import { UserContext } from '../../contexts/UserProvider';
import { APP_MODE, isProd } from '../../configs/environment';
import MOBILE_MAX_SIZE from '../../constants/screenSize';

const navigationConfig = [
{
Expand All @@ -41,8 +42,6 @@ const navigationConfig = [
},
];

const MOBILE_SCREEN_SIZE = "420px";

const NavBar = () => {
const history = useHistory();
const logoTag = isProd ? 'BETA' : APP_MODE;
Expand All @@ -55,7 +54,7 @@ const NavBar = () => {
const [isWritingDropdownToggled, setWritingDropdownToggled] = useState(false);
const [isMobile, setIsMobile] = useState(false);

const mobileScreen = window.matchMedia(`(max-width: ${MOBILE_SCREEN_SIZE})`);
const mobileScreen = window.matchMedia(`(max-width: ${MOBILE_MAX_SIZE})`);

const goMain = () => {
history.push(PATH.ROOT);
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/constants/screenSize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const MOBILE_MAX_SIZE = '420px';

export default MOBILE_MAX_SIZE;

0 comments on commit 89a3df7

Please sign in to comment.