Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/components/notification/NotificationItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ interface NotificationItemProps {
date: string;
}

/*==========================
*
* 단일 알림 아이템을 화면에 표시하는 컴포넌트
*
* @parm message 알림 메시지 내용
* @parm date 알림 발생 시각 문자열
* @return JSX.Element 알림 아이템 UI
* @author 김경민
* @version 1.0.0
* @date 2025-12-15
*
==========================**/
Comment on lines +9 to +20

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

컴포넌트에 대한 주석을 표준 JSDoc 형식으로 개선하는 것을 제안합니다. 이렇게 하면 가독성이 향상되고 문서 자동 생성 도구와 더 잘 호환됩니다.

  • 주석 블록을 /** ... */ 형식으로 변경합니다.
  • @parm을 표준 태그인 @param으로 수정합니다.
  • @return을 표준 태그인 @returns로 수정합니다.
  • 가독성을 위해 데코레이션 라인(==========================)은 제거하는 것이 좋습니다.

또한, NotificationItemProps 인터페이스에는 id 속성도 포함되어 있으므로, 문서에 이를 추가하는 것을 고려해 보세요. 현재 함수에서는 사용되지 않지만, props 인터페이스의 일부입니다.

/**
 * 단일 알림 아이템을 화면에 표시하는 컴포넌트
 *
 * @param message 알림 메시지 내용
 * @param date 알림 발생 시각 문자열
 * @returns JSX.Element 알림 아이템 UI
 * @author 김경민
 * @version 1.0.0
 * @date 2025-12-15
 */


export default function NotificationItem({message, date} : NotificationItemProps) {
return (
<li className="w-[540px] bg-white rounded-xl px-4 py-3 shadow-sm">
Expand Down
12 changes: 12 additions & 0 deletions src/components/notification/NotificationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ interface Notification {
date: string;
}

/*==========================
*
* 서버에서 알림 목록을 조회하여 리스트로 렌더링하는 컴포넌트
*
* @parm -
* @return JSX.Element 알림 목록 UI
* @author 김경민
* @version 1.0.0
* @date 2025-12-15
*
==========================**/
Comment on lines +11 to +21

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

컴포넌트에 대한 주석을 표준 JSDoc 형식으로 개선하는 것을 제안합니다.

  • 주석 블록을 /** ... */ 형식으로 변경합니다.
  • 이 컴포넌트는 파라미터를 받지 않으므로 @parm - 라인은 제거하는 것이 좋습니다.
  • @return을 표준 태그인 @returns로 수정합니다.
  • 가독성을 위해 데코레이션 라인은 제거하는 것이 좋습니다.
/**
 * 서버에서 알림 목록을 조회하여 리스트로 렌더링하는 컴포넌트
 *
 * @returns JSX.Element 알림 목록 UI
 * @author 김경민
 * @version 1.0.0
 * @date 2025-12-15
 */


export default function NotificationList() {
const [notifications, setNotifications] = useState<Notification[]>([]);
const [loading, setLoading] = useState(true);
Expand Down
12 changes: 12 additions & 0 deletions src/pages/NotificationPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
import NotificationList from '@/components/notification/NotificationList';

/*==========================
*
* 알림 페이지의 레이아웃을 구성하는 컴포넌트
*
* @parm -
* @return JSX.Element 알림 페이지 UI
* @author 김경민
* @version 1.0.0
* @date 2025-12-15
*
==========================**/
Comment on lines +3 to +13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

컴포넌트에 대한 주석을 표준 JSDoc 형식으로 개선하는 것을 제안합니다.

  • 주석 블록을 /** ... */ 형식으로 변경합니다.
  • 이 컴포넌트는 파라미터를 받지 않으므로 @parm - 라인은 제거하는 것이 좋습니다.
  • @return을 표준 태그인 @returns로 수정합니다.
  • 가독성을 위해 데코레이션 라인은 제거하는 것이 좋습니다.
/**
 * 알림 페이지의 레이아웃을 구성하는 컴포넌트
 *
 * @returns JSX.Element 알림 페이지 UI
 * @author 김경민
 * @version 1.0.0
 * @date 2025-12-15
 */


export default function NotificationPage(){
return (
<section className="w-full flex justify-center pt-4">
Expand Down
Loading