Skip to content

Commit

Permalink
refactor: 필요없는 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
feb-dain committed Nov 9, 2023
1 parent b5fc3d2 commit a8fa084
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/common/Tab/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Menu = ({ label, icon, index, iconPosition = 'left', onClick, ...attribute
role="tab"
id={`${id}-tab-${index}`}
aria-controls={`${id}-panel-${index}`}
aria-selected={activeTab === `menu-${index}` ? true : false}
aria-selected={activeTab === `menu-${index}`}
className={activeTab === `menu-${index}` ? 'active' : ''}
title={label}
icon={icon}
Expand Down
11 changes: 3 additions & 8 deletions frontend/src/components/ui/Navigator/NavigationBar/BasePanel.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
import { Box } from 'car-ffeine-design-system';
import { css } from 'styled-components';

import type { ReactElement } from 'react';

import FlexBox from '@common/FlexBox';

import { MOBILE_BREAKPOINT } from '@constants';

interface Props {
component: ReactElement | null;
}

const BasePanel = ({ component }: Props) => {
return (
<FlexBox width="fit-content" css={containerCss}>
{component !== null && component}
</FlexBox>
);
return <Box css={containerCss}>{component !== null && component}</Box>;
};

const containerCss = css`
position: relative;
margin-left: 7rem;
@media screen and (max-width: ${MOBILE_BREAKPOINT}px) {
margin-left: 0;
position: absolute;
z-index: 99;
}
`;

Expand Down
12 changes: 3 additions & 9 deletions frontend/src/components/ui/Navigator/NavigationBar/LastPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
import { css } from 'styled-components';
import { Box } from 'car-ffeine-design-system';

import type { ReactElement } from 'react';

import FlexBox from '@common/FlexBox';

interface Props {
component: ReactElement | null;
}

const LastPanel = ({ component }: Props) => {
return (
<FlexBox width="fit-content" css={containerCss}>
<Box position="relative" css={{ zIndex: 99 }}>
{component !== null && <>{component}</>}
</FlexBox>
</Box>
);
};

const containerCss = css`
position: relative;
`;

export default LastPanel;
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const CongestionStatistics = ({ stationId }: CongestionStatisticsProps) => {
{isError ? (
<Error
title="앗"
message="데이터를 불러오는데 실패했어요."
subMessage="잠시 후 다시 시도해주세요."
message="데이터를 불러오는데 실패했어요"
subMessage="잠시 후 다시 시도해주세요"
handleRetry={handleRetry}
minHeight={40.4}
/>
Expand Down

0 comments on commit a8fa084

Please sign in to comment.