From b6be03cea364b30bc19fb717d8d0bcd77ecbbd9a Mon Sep 17 00:00:00 2001 From: Moyasee Date: Fri, 26 Sep 2025 17:00:50 +0300 Subject: [PATCH] fix: formatting issues --- .../src/hooks/use-section-collapse.ts | 17 +++---- .../profile-content/profile-content.scss | 4 +- .../profile-content/profile-content.tsx | 50 +++++++++---------- 3 files changed, 32 insertions(+), 39 deletions(-) diff --git a/src/renderer/src/hooks/use-section-collapse.ts b/src/renderer/src/hooks/use-section-collapse.ts index 3c534189..7cd22224 100644 --- a/src/renderer/src/hooks/use-section-collapse.ts +++ b/src/renderer/src/hooks/use-section-collapse.ts @@ -11,15 +11,12 @@ export function useSectionCollapse() { library: false, }); - const toggleSection = useCallback( - (section: keyof SectionCollapseState) => { - setCollapseState(prevState => ({ - ...prevState, - [section]: !prevState[section], - })); - }, - [] - ); + const toggleSection = useCallback((section: keyof SectionCollapseState) => { + setCollapseState((prevState) => ({ + ...prevState, + [section]: !prevState[section], + })); + }, []); return { collapseState, @@ -27,4 +24,4 @@ export function useSectionCollapse() { isPinnedCollapsed: collapseState.pinned, isLibraryCollapsed: collapseState.library, }; -} \ No newline at end of file +} diff --git a/src/renderer/src/pages/profile/profile-content/profile-content.scss b/src/renderer/src/pages/profile/profile-content/profile-content.scss index 4ef53a6d..8f2fcf6f 100644 --- a/src/renderer/src/pages/profile/profile-content/profile-content.scss +++ b/src/renderer/src/pages/profile/profile-content/profile-content.scss @@ -81,13 +81,11 @@ justify-content: center; transition: all ease 0.2s; flex-shrink: 0; - + &:hover { color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.1); } - - } &__tabs { diff --git a/src/renderer/src/pages/profile/profile-content/profile-content.tsx b/src/renderer/src/pages/profile/profile-content/profile-content.tsx index bd7eddb3..f1bb2ab8 100644 --- a/src/renderer/src/pages/profile/profile-content/profile-content.tsx +++ b/src/renderer/src/pages/profile/profile-content/profile-content.tsx @@ -27,8 +27,8 @@ const sectionVariants = { ease: [0.25, 0.1, 0.25, 1], opacity: { duration: 0.1 }, y: { duration: 0.1 }, - height: { duration: 0.2 } - } + height: { duration: 0.2 }, + }, }, expanded: { opacity: 1, @@ -39,16 +39,16 @@ const sectionVariants = { ease: [0.25, 0.1, 0.25, 1], opacity: { duration: 0.2, delay: 0.1 }, y: { duration: 0.3 }, - height: { duration: 0.3 } - } - } + height: { duration: 0.3 }, + }, + }, }; const gameCardVariants = { hidden: { opacity: 0, y: 20, - scale: 0.95 + scale: 0.95, }, visible: { opacity: 1, @@ -56,9 +56,9 @@ const gameCardVariants = { scale: 1, transition: { duration: 0.4, - ease: [0.25, 0.1, 0.25, 1] - } - } + ease: [0.25, 0.1, 0.25, 1], + }, + }, }; const chevronVariants = { @@ -66,16 +66,16 @@ const chevronVariants = { rotate: 0, transition: { duration: 0.2, - ease: "easeInOut" - } + ease: "easeInOut", + }, }, expanded: { rotate: 90, transition: { duration: 0.2, - ease: "easeInOut" - } - } + ease: "easeInOut", + }, + }, }; export function ProfileContent() { @@ -167,16 +167,18 @@ export function ProfileContent() { {hasAnyGames && (
{hasPinnedGames && ( -
+
- + {pinnedGames.length}
@@ -212,7 +212,7 @@ export function ProfileContent() { initial="hidden" animate="visible" transition={{ delay: index * 0.1 }} - style={{ listStyle: 'none' }} + style={{ listStyle: "none" }} > {t("library")}
{userStats && ( - + {numberFormatter.format(userStats.libraryCount)} )} @@ -252,7 +250,7 @@ export function ProfileContent() { initial="hidden" animate="visible" transition={{ delay: index * 0.1 }} - style={{ listStyle: 'none' }} + style={{ listStyle: "none" }} >