From c278bb094a5d5473aec60797ca81d264113cd96e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:14:48 -0500 Subject: [PATCH] feat: unsued code --- src/app/tools/embed/customize/tanks/page.tsx | 4 ++-- src/components/EmbedConfigInputs.tsx | 14 +------------- src/components/TanksEmbed.tsx | 4 ++-- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/app/tools/embed/customize/tanks/page.tsx b/src/app/tools/embed/customize/tanks/page.tsx index 77159723d..4c51c23ce 100644 --- a/src/app/tools/embed/customize/tanks/page.tsx +++ b/src/app/tools/embed/customize/tanks/page.tsx @@ -31,8 +31,8 @@ const tankEmbedConfig = { type: EmbedConfigType.FullTextControl, default: { color: undefined, weight: 'bold', size: '3' }, }, - cardTitleAutoColor: { type: EmbedConfigType.Boolean, default: true }, - cardTitleAutoIcon: { type: EmbedConfigType.Boolean, default: true }, + cardTitleTypeColor: { type: EmbedConfigType.Boolean, default: true }, + cardTitleClassIcon: { type: EmbedConfigType.Boolean, default: true }, cardBodyBackgroundColor: { type: EmbedConfigType.Color, default: { base: 'gray', variant: '2' }, diff --git a/src/components/EmbedConfigInputs.tsx b/src/components/EmbedConfigInputs.tsx index 89053560a..59386ec3d 100644 --- a/src/components/EmbedConfigInputs.tsx +++ b/src/components/EmbedConfigInputs.tsx @@ -21,7 +21,7 @@ import { TextField, } from '@radix-ui/themes'; import { produce } from 'immer'; -import { capitalize, clamp, startCase, times } from 'lodash'; +import { capitalize, startCase, times } from 'lodash'; import { Dispatch, ReactNode, @@ -73,19 +73,7 @@ export function EmbedConfigInputs({ }, [], ); - const wrapper = useRef(null); - const handlePointerMove = useCallback((event: PointerEvent) => { - event.preventDefault(); - if (!wrapper.current) return; - - wrapper.current.style.top = `${clamp(parseFloat(wrapper.current.style.top) + event.movementY, 32, window.innerHeight - 32 - 32)}px`; - wrapper.current.style.right = `${clamp(parseFloat(wrapper.current.style.right) - event.movementX, 32, window.innerWidth - 32 - 320)}px`; - }, []); - const handlePointerUp = useCallback(() => { - window.removeEventListener('pointermove', handlePointerMove); - window.removeEventListener('pointerup', handlePointerUp); - }, []); const fileInput = useRef(); useEffect(() => { diff --git a/src/components/TanksEmbed.tsx b/src/components/TanksEmbed.tsx index c6b8b12c4..df121674f 100644 --- a/src/components/TanksEmbed.tsx +++ b/src/components/TanksEmbed.tsx @@ -55,7 +55,7 @@ export function TanksEmbedCard({ tank, state }: TanksEmbedCardProps) { > - {tank !== null && state.cardTitleAutoIcon && ( + {tank !== null && state.cardTitleClassIcon && ( <> {tank.class === 'lightTank' && (