Skip to content
This repository was archived by the owner on May 19, 2023. It is now read-only.

Commit 3e6c3b1

Browse files
committed
chore: fixed lint issues
1 parent 411ebf7 commit 3e6c3b1

File tree

11 files changed

+138
-170
lines changed

11 files changed

+138
-170
lines changed

dist/components/atoms/Logo.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React from 'react';
1+
import React, { FC } from 'react';
22
interface LogoProps extends React.Props<HTMLImageElement> {
33
alt?: string;
4-
style?: React.CSSProperties;
54
}
6-
declare const _default: React.ForwardRefExoticComponent<Pick<LogoProps, "alt" | "style" | "children" | "key"> & React.RefAttributes<HTMLImageElement>>;
7-
export default _default;
5+
declare const Logo: FC<LogoProps>;
6+
export default Logo;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from 'react';
1+
import React, { FC } from 'react';
22
interface LogoProps extends React.Props<HTMLImageElement> {
33
alt?: string;
44
height?: string | number;
55
style?: React.CSSProperties;
66
}
7-
declare const _default: React.ForwardRefExoticComponent<Pick<LogoProps, "alt" | "height" | "style" | "children" | "key"> & React.RefAttributes<HTMLImageElement>>;
8-
export default _default;
7+
declare const LogoNavbar: FC<LogoProps>;
8+
export default LogoNavbar;

dist/index.js

Lines changed: 40 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.modern.js

Lines changed: 28 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.modern.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/atoms/LoginOption.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const LoginOption: FC<LoginOptionProps> = ({
5858
)
5959

6060
const handleOnClick = () => {
61-
if (!!onClick) {
61+
if (onClick) {
6262
return onClick()
6363
}
6464
return window.open('https://www.poa.network/for-users/nifty-wallet/getting-started', '_blank')
@@ -75,23 +75,25 @@ const LoginOption: FC<LoginOptionProps> = ({
7575
{...rest}
7676
>
7777
{/* only with Nifty we display the Tooltip because atm we can't check if MetaMask is also enabled */}
78-
{!!providerInfo && providerInfo.eProvider === EProvider.NIFTY &&
79-
<Tooltip arrow title='Please, make sure you only have one browser wallet enabled.'>
78+
{!!providerInfo && providerInfo.eProvider === EProvider.NIFTY
79+
&& (
80+
<Tooltip arrow title="Please, make sure you only have one browser wallet enabled.">
8081
{providerContent}
8182
</Tooltip>
82-
}
83-
{!!providerInfo && providerInfo.eProvider !== EProvider.NIFTY &&
84-
providerContent
85-
}
86-
{!providerInfo &&
83+
)}
84+
{!!providerInfo && providerInfo.eProvider !== EProvider.NIFTY
85+
&& providerContent}
86+
{!providerInfo
87+
&& (
8788
<div className={classes.content}>
8889
<img
8990
className={classes.imageWrapper}
9091
src={niftyIconImg}
91-
alt='Nifty wallet icon'
92-
/>{'Install Nifty wallet'}
92+
alt="Nifty wallet icon"
93+
/>
94+
Install Nifty wallet
9395
</div>
94-
}
96+
)}
9597
</Button>
9698
)
9799
}

src/components/atoms/Logo.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
import React from 'react'
1+
import React, { FC } from 'react'
22
import { logoFullWhite } from '../../assets/images'
33

44
interface LogoProps extends React.Props<HTMLImageElement> {
55
alt?: string
6-
style?: React.CSSProperties
76
}
87

9-
export default React.forwardRef((
10-
props: LogoProps,
11-
ref?: React.Ref<HTMLImageElement> | null,
12-
) => {
13-
const { alt = 'RIF OS', ...other } = props
8+
const Logo: FC<LogoProps> = ({ alt = 'RIF OS logo', ...rest }) => <img src={logoFullWhite} alt={alt} {...rest} />
149

15-
return <img src={logoFullWhite} alt={alt} ref={ref} {...other} />
16-
})
10+
export default Logo
Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { FC } from 'react'
22
import { logoFullWhite } from '../../assets/images'
33

44
interface LogoProps extends React.Props<HTMLImageElement> {
@@ -7,19 +7,12 @@ interface LogoProps extends React.Props<HTMLImageElement> {
77
style?: React.CSSProperties
88
}
99

10-
export default React.forwardRef((
11-
props: LogoProps,
12-
ref?: React.Ref<HTMLImageElement> | null,
13-
) => {
14-
const { alt = 'RIF OS', height = '44px', ...other } = props
15-
16-
return (
17-
<img
18-
src={logoFullWhite}
19-
alt={alt}
20-
height={height}
21-
ref={ref}
22-
{...other}
23-
/>
24-
)
25-
})
10+
const LogoNavbar: FC<LogoProps> = ({ alt = 'navbar logo', height = '44px', ...rest }) => (
11+
<img
12+
src={logoFullWhite}
13+
alt={alt}
14+
height={height}
15+
{...rest}
16+
/>
17+
)
18+
export default LogoNavbar

0 commit comments

Comments
 (0)