Skip to content

Commit

Permalink
[Issue-199] Fix some UI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lw-cdm committed Nov 27, 2024
1 parent 9f3d80d commit c89c97a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
4 changes: 0 additions & 4 deletions packages/extension-koni-ui/src/Popup/Home/Cards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ const Cards = styled(Component)<ThemeProps>(({ theme: { extendToken, token } }:
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
backgroundColor: '#000',
backgroundImage: 'url("/images/mythical/your-card-background.png")',
backgroundRepeat: 'no-repeat',
backgroundSize: '100% 100%',
height: '100%',

'.__card-list-container': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const Component = ({ className }: Props): React.ReactElement => {
rightPartNode={
(
<button
className={'info-button'}
className={'info-button hidden'}
onClick={openTermAndConditionModal}
>
<InfoIcon />
Expand Down
26 changes: 13 additions & 13 deletions packages/extension-koni-ui/src/Popup/Home/MyProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { AuthenticationMythContext } from '@subwallet/extension-koni-ui/contexts
import { useSetCurrentPage } from '@subwallet/extension-koni-ui/hooks';
import { RootState } from '@subwallet/extension-koni-ui/stores';
import { ThemeProps } from '@subwallet/extension-koni-ui/types';
import CN from 'classnames';
import React, { useCallback, useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
Expand All @@ -33,11 +32,13 @@ const Component = ({ className }: Props): React.ReactElement => {
currentAccount?.address && linkMythAccount().catch(console.error);
}, [currentAccount?.address, linkMythAccount]);

// @ts-ignore
const logIn = useCallback(() => {
setLoading(true);
onLogin();
}, [onLogin]);

// @ts-ignore
const logOut = useCallback(() => {
setLoading(true);
onLogout().then(() => {
Expand All @@ -62,17 +63,17 @@ const Component = ({ className }: Props): React.ReactElement => {
<div className={className}>
<MainScreenHeader
className={'profile-header'}
rightPartNode={
(
<MythButton
className={CN('login-button')}
isLoading={loading}
onClick={!isLinkedMyth ? logIn : logOut}
>
{!isLinkedMyth ? t('Log in') : t('Log out')}
</MythButton>
)
}
// rightPartNode={
// (
// <MythButton
// className={CN('login-button')}
// isLoading={loading}
// onClick={!isLinkedMyth ? logIn : logOut}
// >
// {!isLinkedMyth ? t('Log in') : t('Log out')}
// </MythButton>
// )
// }
title={t('My profile')}
/>
<div className={'__profile-container'}>
Expand Down Expand Up @@ -126,7 +127,6 @@ const Component = ({ className }: Props): React.ReactElement => {

const MyProfile = styled(Component)<ThemeProps>(({ theme: { extendToken, token } }: ThemeProps) => {
return {
backgroundColor: '#000',
display: 'flex',
flexDirection: 'column',
height: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ function Component ({ bonusText, className, datetime, difficulty, id, isExpired,
const result: string[] = [];

const abbMap: Record<string, string> = {
power: 'POW',
power: 'PWR',
strength: 'STR',
acceleration: 'ACC',
jump: 'JMP',
quickness: 'QUI',
presence: 'PRS',
presence: 'PRE',
endurance: 'END',
carry: 'CAR'
};
Expand Down

0 comments on commit c89c97a

Please sign in to comment.