altence / lightence-ant-design-react-template

Free and easy-to-use admin template based on React 17+
https://altence.com/lightence-landing
MIT License
994 stars 251 forks source link

TypeScript Error in /my-awesome-project/src/components/profile/profileCard/profileFormNav/nav/PersonalInfo/PhoneItem/PhoneItem.tsx(34,27) #255

Closed demonarch closed 1 year ago

demonarch commented 1 year ago

This is the first time I'm trying to deploy the demo locally, I didn't have a problem with deploying npmfixed branch. Now I'm going to use default branch and after fixing all requirements as described by Altence team, I get this error after using yarn start command :

Compiled with warnings.

my-awesome-project/src/components/profile/profileCard/profileFormNav/nav/PersonalInfo/PhoneItem/PhoneItem.tsx
TypeScript error in /my-awesome-project/src/components/profile/profileCard/profileFormNav/nav/PersonalInfo/PhoneItem/PhoneItem.tsx(34,27):
No overload matches this call.
  Overload 1 of 2, '(props: { onChange: (value?: E164Number | undefined) => void; value?: E164Number | undefined; country?: CountryCode | undefined; international?: boolean | undefined; ... 4 more ...; smartCaret?: boolean | undefined; } & { ...; } & { ...; }): ReactElement<...>', gave the following error.
    Type '{ disabled: boolean | undefined; className: string; onClick: (() => void) | undefined; }' is not assignable to type 'IntrinsicAttributes & { onChange: (value?: E164Number | undefined) => void; value?: E164Number | undefined; country?: CountryCode | undefined; ... 5 more ...; smartCaret?: boolean | undefined; } & { ...; } & { ...; }'.
      Property 'disabled' does not exist on type 'IntrinsicAttributes & { onChange: (value?: E164Number | undefined) => void; value?: E164Number | undefined; country?: CountryCode | undefined; ... 5 more ...; smartCaret?: boolean | undefined; } & { ...; } & { ...; }'.
  Overload 2 of 2, '(props: StyledComponentPropsWithAs<PhoneInputComponentType, any, {}, never, PhoneInputComponentType, PhoneInputComponentType>): ReactElement<...>', gave the following error.
    Type '{ disabled: boolean | undefined; className: string; onClick: (() => void) | undefined; }' is not assignable to type 'IntrinsicAttributes & { onChange: (value?: E164Number | undefined) => void; value?: E164Number | undefined; country?: CountryCode | undefined; ... 5 more ...; smartCaret?: boolean | undefined; } & { ...; } & { ...; }'.
      Property 'disabled' does not exist on type 'IntrinsicAttributes & { onChange: (value?: E164Number | undefined) => void; value?: E164Number | undefined; country?: CountryCode | undefined; ... 5 more ...; smartCaret?: boolean | undefined; } & { ...; } & { ...; }'.  TS2769

    32 |       ]}
    33 |     >
  > 34 |       <S.PhoneNumberInput disabled={verified} className="ant-input" onClick={onClick} />
       |                           ^
    35 |     </BaseButtonsForm.Item>
    36 |   );
    37 | };

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

I would appreciate your attention and response. Thank you.

leineveber commented 1 year ago

Hello @kian-ara,

Is it possible that you have deleted original yarn.lock that comes from the repository? If you clone new project looks like there is no error

leineveber commented 1 year ago

@kian-ara fixed this error in #256 soon will be merged to main closing