diff --git a/package.json b/package.json index 14ddcc7..2d2d3d7 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "react-toastify": "^10.0.4", "wowds-icons": "^0.1.0", "wowds-tokens": "^0.0.9", - "wowds-ui": "^0.1.7", "zustand": "^4.5.0" + "wowds-ui": "^0.1.8", }, "devDependencies": { "@sentry/react": "^8.22.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1f002c2..1d4121a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,8 +57,8 @@ dependencies: specifier: ^0.0.9 version: 0.0.9 wowds-ui: - specifier: ^0.1.7 - version: 0.1.7(next@14.2.4)(react@18.2.0) + specifier: ^0.1.8 + version: 0.1.8(next@14.2.4)(react-dom@18.2.0)(react@18.2.0) zustand: specifier: ^4.5.0 version: 4.5.1(@types/react@18.2.58)(react@18.2.0) @@ -7812,6 +7812,21 @@ packages: dependencies: js-tokens: 4.0.0 + /lottie-react@2.4.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-pDJGj+AQlnlyHvOHFK7vLdsDcvbuqvwPZdMlJ360wrzGFurXeKPr8SiRCjLf3LrNYKANQtSsh5dz9UYQHuqx4w==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + lottie-web: 5.12.2 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /lottie-web@5.12.2: + resolution: {integrity: sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==} + dev: false + /loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: @@ -10271,15 +10286,18 @@ packages: resolution: {integrity: sha512-fMGyb92sZ1iSf0TGSabQVym/MWsYyfetgBBNbZ0K6eGfESKtZF8AM1aDYRODmwyPkPSnt0SmOtRWMDxnPsnCqg==} dev: false - /wowds-ui@0.1.7(next@14.2.4)(react@18.2.0): - resolution: {integrity: sha512-ls2SnsTVfZpF2IOVu1N0FSo+XdGtlxtp+YOTwdd/l2lLX+Mh99/HKLsH6Q36p+yRF9zu0iiHv5dIlX790jvkOg==} + /wowds-ui@0.1.8(next@14.2.4)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-a6DSdxoQxZPRMkFodbY1GKYWxzuzCpSAir5WAKU0lPO3cmTmK1ILLXqlI+lANfI9fRAzCZDY9RoX5vdBl9yz7A==} peerDependencies: next: ^14.1.1 react: ^18.2.0 dependencies: + lottie-react: 2.4.0(react-dom@18.2.0)(react@18.2.0) next: 14.2.4(@babel/core@7.23.9)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1) react: 18.2.0 wowds-icons: 0.1.1 + transitivePeerDependencies: + - react-dom dev: false /wrap-ansi@7.0.0: diff --git a/src/components/auth/DepartmentSelect.tsx b/src/components/auth/DepartmentSelect.tsx index 7c00368..a54256e 100644 --- a/src/components/auth/DepartmentSelect.tsx +++ b/src/components/auth/DepartmentSelect.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import styled from '@emotion/styled'; import { useGetDepartmentList } from '@/hooks/query'; import { Control, Controller } from 'react-hook-form'; import DropDown from 'wowds-ui/DropDown'; @@ -32,28 +33,35 @@ const DepartmentSelect = ({ control }: DepartmentSelectProps) => { } }} render={({ field }) => ( - { - field.onChange(selectedValue); - }}> - - {departmentList.map((department, index) => { - return ( - - ); - })} - - + + { + field.onChange(selectedValue); + }}> + + {departmentList.map((department, index) => { + return ( + + ); + })} + + + )} /> ); }; export default DepartmentSelect; + +const InputFormWrapper = styled.div` + height: 84.8px; + width: 100%; +`; diff --git a/src/components/chatbot/ChannelService.ts b/src/components/chatbot/ChannelService.ts deleted file mode 100644 index 70e5326..0000000 --- a/src/components/chatbot/ChannelService.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -declare global { - interface Window { - ChannelIO: (arg0: string, arg1?: unknown, arg2?: unknown) => void; - ChannelIOInitialized: boolean; - } -} - -class ChannelService { - constructor() { - this.loadScript(); - } - - loadScript() { - const w = window; - if (w.ChannelIOInitialized) { - return; - } - const channelIO = function () { - // eslint-disable-next-line prefer-rest-params - channelIO.c(arguments); - }; - - channelIO.q = [] as any[]; - channelIO.c = function (args: any) { - channelIO.q.push(args); - }; - w.ChannelIO = channelIO; - function initializeChannelIO() { - if (w.ChannelIOInitialized) { - return; - } - w.ChannelIOInitialized = true; - const script = document.createElement("script"); - script.type = "text/javascript"; - script.async = true; - script.src = "https://cdn.channel.io/plugin/ch-plugin-web.js"; - const firstScript = document.getElementsByTagName("script")[0]; - if (firstScript?.parentNode) { - firstScript.parentNode.insertBefore(script, firstScript); - } - } - if (document.readyState === "complete") { - initializeChannelIO(); - } else { - w.addEventListener("DOMContentLoaded", initializeChannelIO); - w.addEventListener("load", initializeChannelIO); - } - } - boot(settings: any, callback: any) { - window.ChannelIO("boot", settings, callback); - } - onBadgeChanged(callback: (number: number) => void) { - window.ChannelIO("onBadgeChanged", callback); - } - addTags(tags: string[]) { - window.ChannelIO("addTags", tags); - } - shutdown() { - window.ChannelIO("shutdown"); - } -} - -export default ChannelService; diff --git a/src/components/chatbot/Chatbot.tsx b/src/components/chatbot/Chatbot.tsx deleted file mode 100644 index 422ef9e..0000000 --- a/src/components/chatbot/Chatbot.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useEffect } from 'react'; - -import { CHANNELIO_PLUGIN_KEY } from '@constants/environment'; - -import ChannelService from '@/components/chatbot/ChannelService'; - -export default function Chatbot() { - useEffect(() => { - const channelTalk = new ChannelService(); - - channelTalk.boot({ pluginKey: CHANNELIO_PLUGIN_KEY }, () => {}); - - return () => channelTalk.shutdown(); - }, []); - - return