From 321ad87d4fadf62dd9ba41bb47b79d2e6cf5d5b7 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 13:37:09 +0000 Subject: [PATCH] Reverted to edit edt-bfd6bc21-0add-4509-ab56-b4fbae0e8457: "Increase bottom margin of section Increase the bottom margin of the recent transactions section from 30px to 50px." --- src/components/AppVersionInfo.tsx | 131 +++--------------------------- 1 file changed, 13 insertions(+), 118 deletions(-) diff --git a/src/components/AppVersionInfo.tsx b/src/components/AppVersionInfo.tsx index c7b8eec..411a774 100644 --- a/src/components/AppVersionInfo.tsx +++ b/src/components/AppVersionInfo.tsx @@ -2,16 +2,11 @@ import React, { useCallback, useEffect, useState, useRef } from 'react'; import { getAppVersionInfo, isAndroidPlatform } from '@/utils/platform'; import { Label } from '@/components/ui/label'; -import { Input } from '@/components/ui/input'; -import { Textarea } from '@/components/ui/textarea'; -import { Button } from '@/components/ui/button'; - interface AppVersionInfoProps { className?: string; showDevInfo?: boolean; editable?: boolean; } - const AppVersionInfo: React.FC = ({ className, showDevInfo = true, @@ -32,9 +27,6 @@ const AppVersionInfo: React.FC = ({ // 편집 가능한 필드를 위한 상태 const [editableVersionName, setEditableVersionName] = useState('1.0.1'); const [editableBuildNumber, setEditableBuildNumber] = useState('2'); - const [companyText, setCompanyText] = useState('ZELLYY CLOUD'); - const [detailText, setDetailText] = useState('The first build'); - const [isEditing, setIsEditing] = useState(false); // 버전 정보 가져오기 const fetchVersionInfo = useCallback(async () => { @@ -110,136 +102,39 @@ const AppVersionInfo: React.FC = ({ } } }, [fetchVersionInfo, error, loading, editable]); - - // 변경사항 저장 처리 - const handleSaveChanges = () => { - // 편집 모드 종료 - setIsEditing(false); - - // 실제 저장 로직 구현 (로컬 스토리지에 저장) - try { - const versionData = { - versionName: editableVersionName, - buildNumber: parseInt(editableBuildNumber, 10), - companyText, - detailText - }; - localStorage.setItem('customVersionInfo', JSON.stringify(versionData)); - console.log('변경사항 저장 완료:', versionData); - } catch (error) { - console.error('변경사항 저장 실패:', error); - } - }; - - // 로컬 스토리지에서 저장된 버전 정보 로드 - useEffect(() => { - if (editable) { - try { - const savedData = localStorage.getItem('customVersionInfo'); - if (savedData) { - const parsedData = JSON.parse(savedData); - setEditableVersionName(parsedData.versionName || '1.0.1'); - setEditableBuildNumber(String(parsedData.buildNumber || 2)); - setCompanyText(parsedData.companyText || 'ZELLYY CLOUD'); - setDetailText(parsedData.detailText || 'The first build'); - } - } catch (error) { - console.error('저장된 버전 정보 로드 실패:', error); - } - } - }, [editable]); - if (editable) { - return ( -
+ return
- {isEditing ? ( -
- setEditableVersionName(e.target.value)} - className="text-center" - /> - setEditableBuildNumber(e.target.value)} - className="text-center w-20" - /> -
- ) : ( -
- {editableVersionName} (build {editableBuildNumber}) -
- )} +
+ {editableVersionName} (build {editableBuildNumber}) +
- {isEditing ? ( -