Skip to content

Commit 9c9a1f7

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feat/258
2 parents ba8dfd6 + 4efdc4a commit 9c9a1f7

File tree

263 files changed

+7626
-973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+7626
-973
lines changed

.eslintrc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ module.exports = {
1818
],
1919
plugins: ['react', '@typescript-eslint', 'react-hooks', 'jsx-a11y'],
2020
rules: {
21-
'react-hooks/rules-of-hooks': 'error',
22-
'react-hooks/exhaustive-deps': 'warn',
2321
'react/react-in-jsx-scope': 'off',
2422
'comma-dangle': 'off',
2523
'react/display-name': 'off',

.github/workflows/deploy-app.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build & Deploy Ahhachul App
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- main
@@ -54,4 +55,4 @@ jobs:
5455
aws s3 cp services/ahhachul.com/build s3://${S3_BUCKET_NAME} --recursive
5556
5657
- name: Invalidate CloudFront
57-
run: aws cloudfront create-invalidation --distribution-id ${{ env.AWS_CLOUDFRONT_DISTRIBUTION_ID_USER }} --paths "/*"
58+
run: aws cloudfront create-invalidation --distribution-id ${{ env.AWS_CLOUDFRONT_DISTRIBUTION_ID_USER }} --paths "/*"

.husky/pre-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
# lint-staged 실행
5+
yarn lint-staged || exit 1

.husky/prepare-commit-msg

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
# 현재 브랜치 이름 가져오기
5+
branch_name=$(git rev-parse --abbrev-ref HEAD)
6+
7+
# 브랜치 이름에서 숫자 또는 텍스트 식별자 추출
8+
issue_identifier=$(echo "$branch_name" | grep -oE '[^/]+$')
9+
10+
# 식별자가 없으면 스크립트 종료
11+
if [ -z "$issue_identifier" ]; then
12+
echo "No issue identifier found." >> /tmp/husky-debug.log
13+
exit 0
14+
fi
15+
16+
# 커밋 메시지 파일 경로
17+
commit_msg_file="$1"
18+
19+
# 커밋 메시지 경로 디버깅
20+
if [ ! -f "$commit_msg_file" ]; then
21+
echo "COMMIT_EDITMSG file not found: $commit_msg_file" >> /tmp/husky-debug.log
22+
exit 1
23+
fi
24+
25+
# 커밋 메시지 끝에 식별자 추가 (줄바꿈 없이)
26+
if ! grep -q "(#$issue_identifier)" "$commit_msg_file"; then
27+
sed -i '' -e "\$s/\$/ \\(#$issue_identifier\\)/" "$commit_msg_file"
28+
echo "Issue identifier added: (#$issue_identifier)" >> /tmp/husky-debug.log
29+
fi

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ packageExtensions:
2020
dependencies:
2121
'@lexical/clipboard': '^0.14.2'
2222
'@lexical/selection': '^0.14.2'
23+
'eslint-config-next@*':
24+
dependencies:
25+
'next': '*'

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
"prepare": "husky",
1111
"graph": "nx run-many --target=build --graph",
1212
"storybook": "nx storybook @ahhachul/storybook",
13+
"dev:app": "yarn workspace ahhachul.com start",
1314
"dev:one-app": "yarn workspace @ahhachul/one-app dev",
1415
"test:one-app": "yarn workspace @ahhachul/one-app test",
1516
"dev:mocking": "yarn workspace @ahhachul/one-app dev:mocking",
1617
"server:mocking": "yarn workspace @ahhachul/one-app server:mocking",
18+
"build:app": "nx build ahhachul.com",
1719
"build:one-app": "nx build @ahhachul/one-app",
1820
"build:all": "nx run-many --target=build --all",
1921
"start:one-app": "yarn workspace @ahhachul/one-app start"

packages/react/components/accordion/src/Accordion.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
import { useState } from "react";
2-
import AccordionContext from "./AccordionContext";
3-
import { AccordionProps } from "./types";
4-
import { clsx } from "clsx";
5-
import * as React from "react";
6-
import { accordionStyle } from "./style.css";
1+
import { useState } from 'react';
2+
import AccordionContext from './AccordionContext';
3+
import { AccordionProps } from './types';
4+
import { clsx } from 'clsx';
5+
import * as React from 'react';
6+
import { accordionStyle } from './style.css';
77

88
const Accordion = (props: AccordionProps, ref: React.Ref<HTMLDivElement>) => {
99
const { defaultActiveItems = [], children, className, ...rest } = props;
1010

11-
const [activeItems, setActiveItems] =
12-
useState<string[]>(defaultActiveItems);
11+
const [activeItems, setActiveItems] = useState<string[]>(defaultActiveItems);
1312

1413
const handleSetActiveItem = (item: string) => {
1514
if (activeItems.includes(item)) {
1615
setActiveItems(activeItems.filter((activeItem) => activeItem !== item));
1716
} else {
1817
setActiveItems([...activeItems, item]);
1918
}
20-
};
19+
};
2120

2221
return (
2322
<AccordionContext.Provider

packages/react/components/accordion/src/AccordionButton.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import * as React from "react";
2-
import { AccordionButtonProps } from "./types";
3-
import { clsx } from "clsx";
4-
import { accordionButtonStyle } from "./style.css";
5-
import { useButton } from "@ahhachul/react-hooks-button";
6-
import { useAccordionContext } from "./AccordionContext";
7-
import { useCallback } from "react";
1+
import * as React from 'react';
2+
import { AccordionButtonProps } from './types';
3+
import { clsx } from 'clsx';
4+
import { accordionButtonStyle } from './style.css';
5+
import { useButton } from '@ahhachul/react-hooks-button';
6+
import { useAccordionContext } from './AccordionContext';
7+
import { useCallback } from 'react';
88

99
const AccordionButton = (
1010
props: AccordionButtonProps,
1111
ref: React.Ref<HTMLButtonElement>,
1212
) => {
13-
const { className, itemName = "", onClick, children, ...rest } = props;
13+
const { className, itemName = '', onClick, children, ...rest } = props;
1414

1515
const { setActiveItem } = useAccordionContext();
1616

@@ -25,7 +25,7 @@ const AccordionButton = (
2525
const { buttonProps } = useButton({
2626
...rest,
2727
onClick: handleClick,
28-
elementType: "button",
28+
elementType: 'button',
2929
});
3030

3131
return (

packages/react/components/accordion/src/AccordionItem.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
import * as React from "react";
2-
import { clsx } from "clsx";
3-
import { accordionItemStyle } from "./style.css";
4-
import { AccordionItemProps } from "./types";
5-
import { Children, cloneElement, isValidElement } from "react";
1+
import * as React from 'react';
2+
import { clsx } from 'clsx';
3+
import { accordionItemStyle } from './style.css';
4+
import { AccordionItemProps } from './types';
5+
import { Children, cloneElement, isValidElement } from 'react';
66

7-
const AccordionItem = (props: AccordionItemProps, ref: React.Ref<HTMLDivElement>) => {
7+
const AccordionItem = (
8+
props: AccordionItemProps,
9+
ref: React.Ref<HTMLDivElement>,
10+
) => {
811
const { itemName, children, className, ...rest } = props;
912

1013
const childrenWithProps = Children.toArray(children);
1114

1215
const accordionItemChildren = childrenWithProps.map((child) => {
1316
if (isValidElement(child)) {
14-
return cloneElement(child, { ...child.props, itemName })
17+
return cloneElement(child, { ...child.props, itemName });
1518
}
1619

1720
return null;
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import * as React from "react";
2-
import { AccordionPanelProps } from "./types";
3-
import { clsx } from "clsx";
4-
import { accordionPanelStyle, panelHeight } from "./style.css";
5-
import { useAccordionContext } from "./AccordionContext";
6-
import { useEffect, useRef, useState } from "react";
7-
import { assignInlineVars } from "@vanilla-extract/dynamic";
1+
import * as React from 'react';
2+
import { AccordionPanelProps } from './types';
3+
import { clsx } from 'clsx';
4+
import { accordionPanelStyle, panelHeight } from './style.css';
5+
import { useAccordionContext } from './AccordionContext';
6+
import { useEffect, useRef, useState } from 'react';
7+
import { assignInlineVars } from '@vanilla-extract/dynamic';
88

9-
const AccordionPanel = (props: AccordionPanelProps, ref: React.Ref<HTMLDivElement>) => {
10-
const { itemName = "", children, className, style, ...rest } = props;
9+
const AccordionPanel = (
10+
props: AccordionPanelProps,
11+
ref: React.Ref<HTMLDivElement>,
12+
) => {
13+
const { itemName = '', children, className, style, ...rest } = props;
1114
const innerRef = useRef<HTMLDivElement>(null);
1215

1316
const { activeItems } = useAccordionContext();
@@ -18,7 +21,7 @@ const AccordionPanel = (props: AccordionPanelProps, ref: React.Ref<HTMLDivElemen
1821
if (!innerRef.current) return;
1922

2023
setCurrentPanelHeight(
21-
isActive ? `${innerRef.current.clientHeight}px` : "0",
24+
isActive ? `${innerRef.current.clientHeight}px` : '0',
2225
);
2326
}, [isActive, activeItems]);
2427

@@ -30,7 +33,8 @@ const AccordionPanel = (props: AccordionPanelProps, ref: React.Ref<HTMLDivElemen
3033
data-action-item={isActive}
3134
style={{
3235
...assignInlineVars({
33-
[panelHeight]: currentPanelHeight ?? `$innerRef.current.clientHeight}px`,
36+
[panelHeight]:
37+
currentPanelHeight ?? `$innerRef.current.clientHeight}px`,
3438
}),
3539
...style,
3640
}}
@@ -40,7 +44,7 @@ const AccordionPanel = (props: AccordionPanelProps, ref: React.Ref<HTMLDivElemen
4044
</div>
4145
</div>
4246
);
43-
}
47+
};
4448

4549
const _AccordionPanel = React.forwardRef(AccordionPanel);
4650
export { _AccordionPanel as AccordionPanel };

0 commit comments

Comments
 (0)