Skip to content

Commit

Permalink
fix some (not all) icon passings
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Dec 8, 2024
1 parent 7c5664c commit 5d723e2
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ afterAll(() => {

describe('PseudoActionButton', () => {
it('should show loading state when clicked and reset after timeout has been run', async () => {
const testIcon = <div data-testid="icon" />
const testIcon =() => <div data-testid="icon" />
render(
<PseudoActionButton prefix={testIcon} timeout={500}>
Test
Expand All @@ -35,7 +35,7 @@ describe('PseudoActionButton', () => {
})

it('should maintain loading state if loading is set to true', async () => {
const testIcon = <div data-testid="icon" />
const testIcon = ()=> <div data-testid="icon" />
render(
<PseudoActionButton loading prefix={testIcon} timeout={500}>
Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const NameTableHeader = ({
value={searchQuery}
onChange={(e) => onSearchChange?.(e.target.value)}
hideLabel
icon={<MagnifyingGlassSimpleSVG />}
icon={MagnifyingGlassSimpleSVG}
placeholder={t('action.search')}
/>
</TableHeaderTrailing>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export const AvatarNFT = ({
</Button>
))}
<DialogInput
icon={<MagnifyingGlassSVG />}
icon={MagnifyingGlassSVG}
hideLabel
label="search"
value={searchedInput}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfileSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export const ProfileSnippet = ({
<Button
size="small"
colorStyle="accentSecondary"
prefix={<FastForwardSVG />}
prefix={FastForwardSVG}
data-testid="extend-button"
onClick={() => {
showExtendNamesInput(`extend-names-${name}`, {
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/profile/[name]/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const NameAvailableBanner = ({
<Banner
alert="info"
as="a"
icon={<CheckCircleSVG />}
icon={CheckCircleSVG}
title={t('banner.available.title', { name: normalisedName })}
>
<Trans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export const AddProfileRecordView = ({ control, onAdd, onClose, showDismiss }: P
<DialogInput
label=""
hideLabel
icon={<MagnifyingGlassSimpleSVG />}
icon={MagnifyingGlassSimpleSVG}
size="medium"
placeholder={t('action.search', { ns: 'common' })}
value={search}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const Profile = ({ name, callback, registrationData, resolverExists }: Props) =>
size="medium"
onClick={handleShowAddRecordModal}
data-testid="show-add-profile-records-modal-button"
prefix={<PlusSVG />}
prefix={PlusSVG}
>
{t('steps.profile.addMore')}
</Button>
Expand Down
12 changes: 6 additions & 6 deletions src/components/pages/profile/settings/PrimarySection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const PrimarySection = () => {
buttonId="disabled-reset-primary-name-button"
buttonText={t('action.remove', { ns: 'common' })}
content={t('errors.networkError.blurb', { ns: 'common' })}
prefix={<CrossSVG />}
prefix={CrossSVG}
size="medium"
mobilePlacement="top"
loading={hasGraphErrorLoading}
Expand All @@ -195,7 +195,7 @@ export const PrimarySection = () => {
buttonId="disabled-change-primary-name-button"
buttonText={t('action.change', { ns: 'common' })}
content={t('errors.networkError.blurb', { ns: 'common' })}
prefix={<PersonPlusSVG />}
prefix={PersonPlusSVG}
size="medium"
mobilePlacement="top"
loading={hasGraphErrorLoading}
Expand All @@ -205,7 +205,7 @@ export const PrimarySection = () => {
<>
<Button
data-testid="reset-primary-name-button"
prefix={<CrossSVG />}
prefix={CrossSVG}
colorStyle="redSecondary"
disabled={hasGraphErrorLoading}
loading={hasGraphErrorLoading}
Expand All @@ -215,7 +215,7 @@ export const PrimarySection = () => {
</Button>
<Button
data-testid="change-primary-name-button"
prefix={<PersonPlusSVG />}
prefix={PersonPlusSVG}
disabled={hasGraphErrorLoading}
loading={hasGraphErrorLoading}
onClick={changePrimary}
Expand All @@ -236,7 +236,7 @@ export const PrimarySection = () => {
buttonText={t('section.primary.choosePrimaryName')}
size="small"
content={t('errors.networkError.blurb', { ns: 'common' })}
prefix={<PersonPlusSVG />}
prefix={PersonPlusSVG}
mobilePlacement="top"
loading={hasGraphErrorLoading}
/>
Expand All @@ -246,7 +246,7 @@ export const PrimarySection = () => {
<NoNameButton
data-testid="set-primary-name-button"
size="small"
prefix={<PersonPlusSVG />}
prefix={PersonPlusSVG}
loading={hasGraphErrorLoading}
disabled={hasGraphErrorLoading}
onClick={changePrimary}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/my/names.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function Page() {
target="_blank"
rel="noopener noreferrer"
href="https://support.ens.domains/en/articles/9375254-why-is-my-ens-name-not-in-my-names"
icon={<QuestionCircleSVG />}
icon={QuestionCircleSVG}
title={t('offchainWarning.title')}
>
{t('offchainWarning.text')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const EditRoleView = ({ index, onBack }: Props) => {
label="Role"
size="medium"
hideLabel
icon={<MagnifyingGlassSimpleSVG />}
icon={MagnifyingGlassSimpleSVG}
clearable
value={query}
placeholder={t('input.sendName.views.search.placeholder')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr
size="medium"
onClick={handleShowAddRecordModal}
data-testid="show-add-profile-records-modal-button"
prefix={<PlusSVG />}
prefix={PlusSVG}
>
{t('steps.profile.addMore')}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const SearchView = ({ name, senderRole, onCancel, onSelect }: Props) => {
label="Name"
size="medium"
hideLabel
icon={<MagnifyingGlassSimpleSVG />}
icon={MagnifyingGlassSimpleSVG}
clearable
{...register('query', {
onChange: (e) => {
Expand Down

0 comments on commit 5d723e2

Please sign in to comment.