-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AB테스트 기능 구현 #48
AB테스트 기능 구현 #48
Changes from 8 commits
34a7a85
24255cd
e8ed3b1
0d92a05
254a13d
70c97a1
d4d8fb5
b4a6188
b70c2cd
6d8e939
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import { | |
AppstoreOutlined, UserOutlined, CarOutlined, ShopOutlined, | ||
HomeOutlined, UserSwitchOutlined, | ||
UsergroupDeleteOutlined, FolderOpenOutlined, ControlOutlined, | ||
UserAddOutlined, BoldOutlined, SnippetsOutlined, | ||
UserAddOutlined, BoldOutlined, ApartmentOutlined, SnippetsOutlined, | ||
} from '@ant-design/icons'; | ||
import { Menu, MenuProps } from 'antd'; | ||
import { Link, useLocation, useNavigate } from 'react-router-dom'; | ||
|
@@ -43,6 +43,11 @@ const items: MenuProps['items'] = [ | |
getItem('사장님 권한 요청', '/owner-request', <UserAddOutlined />), | ||
getItem('BCSD Lab', '/member', <BoldOutlined />), | ||
]), | ||
|
||
getItem('테스트', 'test', <ControlOutlined />, [ | ||
getItem('AB 테스트', '/abtest', <ApartmentOutlined />), | ||
getItem('AB 테스트의 테스트 페이지', '/abtest/test', <ApartmentOutlined />), | ||
]), | ||
]; | ||
|
||
const SideNavConatiner = styled.nav` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 코드를 검토한 결과, 몇 가지 개선 사항과 오류를 발견했습니다. 다음은 주요 사항과 개선 제안입니다. 주요 사항
개선 제안- const SideNavConatiner = styled.nav`
+ const SideNavContainer = styled.nav` 이 외에도 아이콘 사용 및 코드에 대한 설명을 추가하는 것을 고려할 수 있습니다. 코드를 더 명확하고 가독성 있게 만들기 위해 주석을 추가하세요. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
export interface Test { | ||
id: number; | ||
status: 'IN_PROGRESS' | 'COMPLETED' | string; | ||
winner_name: string; | ||
creator: string; | ||
team: string; | ||
display_title: string; | ||
title: string; | ||
created_at: string; | ||
updated_at: string; | ||
} | ||
|
||
export interface ABTestResponse { | ||
tests: Test[]; | ||
total_count: number; | ||
current_count: number; | ||
total_page: number; | ||
current_page: number; | ||
} | ||
|
||
export interface ABTest { | ||
display_title: string; | ||
creator: string; | ||
team: string; | ||
title: string; | ||
description: string; | ||
variables: { | ||
rate: number; | ||
display_name: string; | ||
name: string; | ||
}[] | ||
} | ||
|
||
export interface NewABTestResponse { | ||
id: number; | ||
display_title: string; | ||
creator: string; | ||
team: string; | ||
status: 'IN_PROGRESS' | 'COMPLETED' | string; | ||
winner_name: string | null; | ||
title: string; | ||
description: string; | ||
variables: { | ||
rate: number; | ||
display_name: string; | ||
name: string; | ||
}[] | ||
created_at: string; | ||
updated_at: string; | ||
} | ||
|
||
export interface ModifyABTest { | ||
id: string | number; | ||
data: Partial<ABTest>; | ||
} | ||
|
||
export interface ABTestUser { | ||
id: string; | ||
name: string; | ||
detail: string; | ||
} | ||
|
||
export interface ABTestUsersResponse { | ||
users: ABTestUser[] | ||
} | ||
export interface ABTestUserUserID { | ||
id: string | number; | ||
type: string; | ||
model: string; | ||
last_accessed_at: string; | ||
} | ||
|
||
export interface ABTestUserUserIDResponse { | ||
devices: ABTestUserUserID[] | ||
} | ||
|
||
export interface ABTestUserMoveRequest { | ||
id: string | number; | ||
data: { | ||
device_id: string | number; | ||
variable_name: string | number; | ||
} | ||
} | ||
|
||
// 테스트 | ||
export interface ABTestAssignRequest { | ||
title: string; | ||
access_history_id: number | string | null ; | ||
} | ||
|
||
export interface ABTestAssignResponse { | ||
variable_name: string, | ||
access_history_id: number | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div``; | ||
|
||
export const Heading = styled.h1` | ||
font-size: 30px; | ||
font-weight: 700; | ||
color: #404040; | ||
padding: 12px 0 0 12px; | ||
`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 코드를 검토해본 결과, 문법적으로 큰 오류는 없으나 스타일링 관점에서 개선할 부분이 있습니다. 현재 다음은 개선사항에 대한 제안입니다: @@ -1,10 +1,12 @@
import styled from 'styled-components';
export const Container = styled.div`
+ max-width: 1200px;
+ margin: 0 auto;
padding: 20px;
`;
export const Heading = styled.h1`
font-size: 36px; // 통일된 기준으로 변경
font-weight: 700;
color: #333; // 더 어두운 색으로 변경하여 가독성 증가
padding: 12px 0 0 12px;
`; 개선 사항 설명:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드 검토 결과, 몇 가지 개선 사항을 제안합니다.
ABTest
와 관련된 컴포넌트의 경로가 추가되었지만, 이러한 경로에 대한 중복이나 다른 경로와의 충돌이 발생하지 않는지 확인해야 합니다.ABTestTest
와 같은 이름은 혼동을 줄 수 있으므로 의미를 잘 전달하는 이름으로 변경하는 것이 좋습니다.개선 사항을 아래와 같이 제안합니다:
이렇게 수정함으로써 코드의 가독성을 높이고, 의도를 더 명확하게 전달할 수 있습니다.