@uniai-fe/uds-templates 0.5.23 → 0.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-templates",
3
- "version": "0.5.23",
3
+ "version": "0.5.24",
4
4
  "description": "UNIAI Design System; UI Templates Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -159,6 +159,7 @@ export async function getServerCompanyList({
159
159
  total_count: 0,
160
160
  },
161
161
  errors: [],
162
+ meta: { locale: "ko", request_id: "" },
162
163
  };
163
164
  const API_OPTION = {
164
165
  domain,
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
 
3
+ import { useCallback } from "react";
3
4
  import { useAtom } from "jotai";
4
5
  import { serviceInquiryNetworkErrorsAtom } from "../jotai";
5
6
  import type {
@@ -21,22 +22,25 @@ export function useServiceInquiryNetworkError(): UseServiceInquiryNetworkErrorRe
21
22
  );
22
23
 
23
24
  const reportNetworkError: UseServiceInquiryNetworkErrorReturn["reportNetworkError"] =
24
- (nextError: ServiceInquiryNetworkError) => {
25
- setNetworkErrors(currentErrors =>
26
- [
27
- {
28
- ...nextError,
29
- timestamp: nextError.timestamp ?? new Date().toISOString(),
30
- },
31
- ...currentErrors,
32
- ].slice(0, 5),
33
- );
34
- };
25
+ useCallback(
26
+ (nextError: ServiceInquiryNetworkError) => {
27
+ setNetworkErrors(currentErrors =>
28
+ [
29
+ {
30
+ ...nextError,
31
+ timestamp: nextError.timestamp ?? new Date().toISOString(),
32
+ },
33
+ ...currentErrors,
34
+ ].slice(0, 5),
35
+ );
36
+ },
37
+ [setNetworkErrors],
38
+ );
35
39
 
36
40
  const clearNetworkErrors: UseServiceInquiryNetworkErrorReturn["clearNetworkErrors"] =
37
- () => {
41
+ useCallback(() => {
38
42
  setNetworkErrors([]);
39
- };
43
+ }, [setNetworkErrors]);
40
44
 
41
45
  return {
42
46
  networkErrors,