mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-10 02:25:27 +00:00
remove most uses of as any in typescript
- replaced many uses of `as any` with another more specific cast `as T` - filled in missing typed for items that needed to be typed - new runtime code was added where necessary to satisfy the new types with comments - added missing theme variable "sidebar-active" to the Theme variables - forms using `react-hook-form` are now typechecked - changed some instances of `target` into `currentTarget` while removing `as any` assertions
This commit is contained in:
@@ -53,11 +53,11 @@ export function Account() {
|
||||
<div className={styles.username}>@{user.username}</div>
|
||||
</div>
|
||||
<div className={styles.details}>
|
||||
{[
|
||||
{([
|
||||
["username", user.username, <At size={24} />],
|
||||
["email", email, <Envelope size={24} />],
|
||||
["password", "*****", <Key size={24} />]
|
||||
].map(([field, value, icon]) => (
|
||||
] as const).map(([field, value, icon]) => (
|
||||
<div>
|
||||
{icon}
|
||||
<div className={styles.detail}>
|
||||
@@ -71,7 +71,7 @@ export function Account() {
|
||||
onClick={() =>
|
||||
openScreen({
|
||||
id: "modify_account",
|
||||
field: field as any
|
||||
field: field
|
||||
})
|
||||
}
|
||||
contrast
|
||||
|
||||
Reference in New Issue
Block a user