From a61f1cda83dfe86efe15b1b63e7cf6703c03aeee Mon Sep 17 00:00:00 2001 From: v1rtl Date: Fri, 6 Sep 2024 14:42:42 +0300 Subject: [PATCH] fix --- .../[name]/tabs/MoreTab/NameWrapper.tsx | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx index e0e45fbb1..d2e1f3944 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx @@ -65,18 +65,26 @@ const Record = styled.div( flex-direction: row; justify-content: space-between; align-items: center; + + & > svg { + color: ${theme.colors.green}; + } `, ) -const ParentControlRecord = styled(Record)<{ $isPCCBurned: boolean; $cannotUnwrap: boolean }>( - ({ theme, $isPCCBurned, $cannotUnwrap }) => css` - background: ${$cannotUnwrap +const ParentControlRecord = styled(Record)<{ $status: NameWrapperState }>( + ({ theme, $status }) => css` + background: ${$status === 'locked' ? theme.colors.greySurface - : $isPCCBurned - ? theme.colors.greenSurface - : theme.colors.yellowSurface}; + : $status === 'emancipated' + ? theme.colors.yellowSurface + : theme.colors.greenSurface}; & > svg { - color: ${$isPCCBurned ? theme.colors.green : theme.colors.yellow}; + color: ${$status === 'locked' + ? theme.colors.grey + : $status === 'emancipated' + ? theme.colors.yellow + : theme.colors.green}; } `, ) @@ -162,18 +170,14 @@ export const NameWrapper = ({ {status === 'locked' ? : } {isWrapped ? ( - + {status === 'emancipated' ? ( <> - {t('tabs.more.token.pcc.controllable')} + {t('tabs.more.token.pcc.not-controllable')} ) : ( <> - {t('tabs.more.token.pcc.not-controllable')} + {t('tabs.more.token.pcc.controllable')} )}