-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FE] 사용자 통계 기능 구현 (#309) * feat: 사용자 통계 기능 구현 * fix: BarGraph storybook 에러 수정
- Loading branch information
Showing
9 changed files
with
248 additions
and
42 deletions.
There are no files selected for viewing
Submodule security
updated
from 813cef to 269e89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ENDPOINTS } from '@/constants/api'; | ||
import useGetOne from '@/hooks/api/useGetOne'; | ||
|
||
type Props = { | ||
productId: number; | ||
}; | ||
|
||
function useStatistics({ productId }: Props): [Statistics, boolean, boolean] { | ||
const { | ||
data: statistics, | ||
isReady, | ||
isError, | ||
} = useGetOne<Statistics>({ | ||
url: `${ENDPOINTS.PRODUCT(productId)}/statistics`, | ||
}); | ||
|
||
return [statistics, isReady, isError]; | ||
} | ||
|
||
export default useStatistics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters