diff --git a/index.html b/index.html
index 0d8e9039e..be26f5c96 100644
--- a/index.html
+++ b/index.html
@@ -1,4 +1,4 @@
-
+
diff --git a/package-lock.json b/package-lock.json
index 5b794b7ea..bffea9789 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,7 @@
"@atlaskit/pragmatic-drag-and-drop": "1.8.1",
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "2.1.5",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
- "@fontsource/inter": "4.5.14",
+ "@fontsource-variable/inter": "5.2.8",
"@giphy/js-fetch-api": "5.8.0",
"@giphy/js-types": "4.3.0",
"@giphy/react-components": "1.6.0",
@@ -30,7 +30,7 @@
"classnames": "2.5.1",
"dateformat": "5.0.3",
"dayjs": "1.11.20",
- "domhandler": "5.0.3",
+ "domhandler": "6.0.1",
"dompurify": "3.4.5",
"emojibase": "15.3.1",
"emojibase-data": "15.3.2",
@@ -39,7 +39,7 @@
"folds": "2.6.2",
"html-dom-parser": "7.1.0",
"html-react-parser": "6.1.2",
- "i18next": "23.12.2",
+ "i18next": "26.2.0",
"i18next-browser-languagedetector": "8.2.1",
"i18next-http-backend": "4.0.0",
"immer": "11.1.8",
@@ -60,7 +60,7 @@
"react-dom": "18.2.0",
"react-error-boundary": "6.1.1",
"react-google-recaptcha": "2.1.0",
- "react-i18next": "15.0.0",
+ "react-i18next": "17.0.8",
"react-range": "1.10.0",
"react-router-dom": "6.30.3",
"sanitize-html": "2.17.4",
@@ -105,8 +105,8 @@
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "9.1.7",
- "lint-staged": "16.3.2",
- "prettier": "2.8.1",
+ "lint-staged": "17.0.5",
+ "prettier": "3.8.3",
"semantic-release": "25.0.3",
"typescript": "4.9.4",
"vite": "6.4.2",
@@ -2495,10 +2495,14 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@fontsource/inter": {
- "version": "4.5.14",
- "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-4.5.14.tgz",
- "integrity": "sha512-JDC9AocdPLuGsASkvWw9hS5gtHE7K9dOwL98XLrk5yjYqxy4uVnScG58NUvFMJDVJRl/7c8Wnap6PEs+7Zvj1Q=="
+ "node_modules/@fontsource-variable/inter": {
+ "version": "5.2.8",
+ "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.2.8.tgz",
+ "integrity": "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==",
+ "license": "OFL-1.1",
+ "funding": {
+ "url": "https://github.com/sponsors/ayuhito"
+ }
},
"node_modules/@giphy/js-analytics": {
"version": "1.8.1",
@@ -7022,9 +7026,9 @@
}
},
"node_modules/cli-truncate/node_modules/string-width": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.0.tgz",
- "integrity": "sha512-6hJPQ8N0V0P3SNmP6h2J99RLuzrWz2gvT7VnK5tKvrNqJoyS9W4/Fb8mo31UiPvy00z7DQXkP2hnKBVav76thw==",
+ "version": "8.2.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz",
+ "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7112,13 +7116,6 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
- "node_modules/colorette": {
- "version": "2.0.20",
- "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
- "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
@@ -7900,6 +7897,21 @@
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
+ "node_modules/dom-serializer/node_modules/domhandler": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "domelementtype": "^2.3.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
"node_modules/domelementtype": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
@@ -7912,19 +7924,36 @@
]
},
"node_modules/domhandler": {
- "version": "5.0.3",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
- "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-6.0.1.tgz",
+ "integrity": "sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg==",
+ "license": "BSD-2-Clause",
"dependencies": {
- "domelementtype": "^2.3.0"
+ "domelementtype": "^3.0.0"
},
"engines": {
- "node": ">= 4"
+ "node": ">=20.19.0"
},
"funding": {
+ "type": "github",
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
+ "node_modules/domhandler/node_modules/domelementtype": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-3.0.0.tgz",
+ "integrity": "sha512-umCQid3jKbDmVjx8jGaW7uUykm4DEUeyV21hPxNMo2nV955DhUThwqyOIDtreepP31hl84X7G5U9ZfsWvIB3Pg==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fb55"
+ }
+ ],
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=20.19.0"
+ }
+ },
"node_modules/dompurify": {
"version": "3.4.5",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.5.tgz",
@@ -7947,6 +7976,21 @@
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
+ "node_modules/domutils/node_modules/domhandler": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "domelementtype": "^2.3.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
"node_modules/dot-prop": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
@@ -10232,22 +10276,6 @@
"node": ">=20.19.0"
}
},
- "node_modules/html-dom-parser/node_modules/domhandler": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-6.0.1.tgz",
- "integrity": "sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg==",
- "license": "BSD-2-Clause",
- "dependencies": {
- "domelementtype": "^3.0.0"
- },
- "engines": {
- "node": ">=20.19.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/fb55/domhandler?sponsor=1"
- }
- },
"node_modules/html-dom-parser/node_modules/domutils": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-4.0.2.tgz",
@@ -10339,37 +10367,6 @@
}
}
},
- "node_modules/html-react-parser/node_modules/domelementtype": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-3.0.0.tgz",
- "integrity": "sha512-umCQid3jKbDmVjx8jGaW7uUykm4DEUeyV21hPxNMo2nV955DhUThwqyOIDtreepP31hl84X7G5U9ZfsWvIB3Pg==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/fb55"
- }
- ],
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=20.19.0"
- }
- },
- "node_modules/html-react-parser/node_modules/domhandler": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-6.0.1.tgz",
- "integrity": "sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg==",
- "license": "BSD-2-Clause",
- "dependencies": {
- "domelementtype": "^3.0.0"
- },
- "engines": {
- "node": ">=20.19.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/fb55/domhandler?sponsor=1"
- }
- },
"node_modules/htmlparser2": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz",
@@ -10389,6 +10386,21 @@
"entities": "^7.0.1"
}
},
+ "node_modules/htmlparser2/node_modules/domhandler": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "domelementtype": "^2.3.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
"node_modules/htmlparser2/node_modules/entities": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz",
@@ -10465,25 +10477,31 @@
}
},
"node_modules/i18next": {
- "version": "23.12.2",
- "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.12.2.tgz",
- "integrity": "sha512-XIeh5V+bi8SJSWGL3jqbTEBW5oD6rbP5L+E7dVQh1MNTxxYef0x15rhJVcRb7oiuq4jLtgy2SD8eFlf6P2cmqg==",
+ "version": "26.2.0",
+ "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.2.0.tgz",
+ "integrity": "sha512-zwBHldHdTmwN7r6UNc7lC6GWNN+YYg3DrRSeHR5PRRBf5QnJZcYHrQc0uaU26qZeYxR7iFZD+Y315dPnKP47wA==",
"funding": [
{
"type": "individual",
- "url": "https://locize.com"
- },
- {
- "type": "individual",
- "url": "https://locize.com/i18next.html"
+ "url": "https://www.locize.com/i18next"
},
{
"type": "individual",
"url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
+ },
+ {
+ "type": "individual",
+ "url": "https://www.locize.com"
}
],
- "dependencies": {
- "@babel/runtime": "^7.23.2"
+ "license": "MIT",
+ "peerDependencies": {
+ "typescript": "^5 || ^6"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
}
},
"node_modules/i18next-browser-languagedetector": {
@@ -11923,37 +11941,28 @@
"license": "MIT"
},
"node_modules/lint-staged": {
- "version": "16.3.2",
- "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.3.2.tgz",
- "integrity": "sha512-xKqhC2AeXLwiAHXguxBjuChoTTWFC6Pees0SHPwOpwlvI3BH7ZADFPddAdN3pgo3aiKgPUx/bxE78JfUnxQnlg==",
+ "version": "17.0.5",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.0.5.tgz",
+ "integrity": "sha512-d12yC+/e8RhBjZtaxZn71FyrgU/P5e+uAPifhCLwdosQZP/zamSdKRWDC30ocVIbzDKiFG1McHc/LUgB92GIPw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "commander": "^14.0.3",
- "listr2": "^9.0.5",
- "micromatch": "^4.0.8",
+ "listr2": "^10.2.1",
+ "picomatch": "^4.0.4",
"string-argv": "^0.3.2",
- "tinyexec": "^1.0.2",
- "yaml": "^2.8.2"
+ "tinyexec": "^1.1.2"
},
"bin": {
"lint-staged": "bin/lint-staged.js"
},
"engines": {
- "node": ">=20.17"
+ "node": ">=22.22.1"
},
"funding": {
"url": "https://opencollective.com/lint-staged"
- }
- },
- "node_modules/lint-staged/node_modules/commander": {
- "version": "14.0.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
- "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=20"
+ },
+ "optionalDependencies": {
+ "yaml": "^2.8.4"
}
},
"node_modules/lint-staged/node_modules/yaml": {
@@ -11962,6 +11971,7 @@
"integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==",
"dev": true,
"license": "ISC",
+ "optional": true,
"bin": {
"yaml": "bin.mjs"
},
@@ -11973,21 +11983,20 @@
}
},
"node_modules/listr2": {
- "version": "9.0.5",
- "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz",
- "integrity": "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==",
+ "version": "10.2.1",
+ "resolved": "https://registry.npmjs.org/listr2/-/listr2-10.2.1.tgz",
+ "integrity": "sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "cli-truncate": "^5.0.0",
- "colorette": "^2.0.20",
- "eventemitter3": "^5.0.1",
+ "cli-truncate": "^5.2.0",
+ "eventemitter3": "^5.0.4",
"log-update": "^6.1.0",
"rfdc": "^1.4.1",
- "wrap-ansi": "^9.0.0"
+ "wrap-ansi": "^10.0.0"
},
"engines": {
- "node": ">=20.0.0"
+ "node": ">=22.13.0"
}
},
"node_modules/listr2/node_modules/ansi-regex": {
@@ -12016,26 +12025,18 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/listr2/node_modules/emoji-regex": {
- "version": "10.6.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
- "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/listr2/node_modules/string-width": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
- "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
+ "version": "8.2.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz",
+ "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "emoji-regex": "^10.3.0",
- "get-east-asian-width": "^1.0.0",
- "strip-ansi": "^7.1.0"
+ "get-east-asian-width": "^1.5.0",
+ "strip-ansi": "^7.1.2"
},
"engines": {
- "node": ">=18"
+ "node": ">=20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -12058,18 +12059,18 @@
}
},
"node_modules/listr2/node_modules/wrap-ansi": {
- "version": "9.0.2",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
- "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-10.0.0.tgz",
+ "integrity": "sha512-SGcvg80f0wUy2/fXES19feHMz8E0JoXv2uNgHOu4Dgi2OrCy1lqwFYEJz1BLbDI0exjPMe/ZdzZ/YpGECBG/aQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "ansi-styles": "^6.2.1",
- "string-width": "^7.0.0",
- "strip-ansi": "^7.1.0"
+ "ansi-styles": "^6.2.3",
+ "string-width": "^8.2.0",
+ "strip-ansi": "^7.1.2"
},
"engines": {
- "node": ">=18"
+ "node": ">=20"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
@@ -15754,15 +15755,16 @@
}
},
"node_modules/prettier": {
- "version": "2.8.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz",
- "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==",
+ "version": "3.8.3",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz",
+ "integrity": "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==",
"dev": true,
+ "license": "MIT",
"bin": {
- "prettier": "bin-prettier.js"
+ "prettier": "bin/prettier.cjs"
},
"engines": {
- "node": ">=10.13.0"
+ "node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
@@ -16026,16 +16028,19 @@
}
},
"node_modules/react-i18next": {
- "version": "15.0.0",
- "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.0.tgz",
- "integrity": "sha512-2O3IgF4zivg57Q6p6i+ChDgJ371IDcEWbuWC6gvoh5NbkDMs0Q+O7RPr4v61+Se32E0V+LmtwePAeqWZW0bi6g==",
+ "version": "17.0.8",
+ "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-17.0.8.tgz",
+ "integrity": "sha512-0ooKbGLU8JXhe1zwpQUWIeXSgLPOfwJmgheWRIUpcoA0CpyabpGhayjdG+/eA5esC1AQ8h2jWpXjJfzQzeDOCw==",
+ "license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.24.8",
- "html-parse-stringify": "^3.0.1"
+ "@babel/runtime": "^7.29.2",
+ "html-parse-stringify": "^3.0.1",
+ "use-sync-external-store": "^1.6.0"
},
"peerDependencies": {
- "i18next": ">= 23.2.3",
- "react": ">= 16.8.0"
+ "i18next": ">= 26.2.0",
+ "react": ">= 16.8.0",
+ "typescript": "^5 || ^6"
},
"peerDependenciesMeta": {
"react-dom": {
@@ -16043,6 +16048,9 @@
},
"react-native": {
"optional": true
+ },
+ "typescript": {
+ "optional": true
}
}
},
@@ -18137,9 +18145,9 @@
"license": "MIT"
},
"node_modules/tinyexec": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz",
- "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.2.tgz",
+ "integrity": "sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==",
"dev": true,
"license": "MIT",
"engines": {
diff --git a/package.json b/package.json
index 85ea43584..88e93a08a 100644
--- a/package.json
+++ b/package.json
@@ -66,7 +66,7 @@
"@atlaskit/pragmatic-drag-and-drop": "1.8.1",
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "2.1.5",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
- "@fontsource/inter": "4.5.14",
+ "@fontsource-variable/inter": "5.2.8",
"@giphy/js-fetch-api": "5.8.0",
"@giphy/js-types": "4.3.0",
"@giphy/react-components": "1.6.0",
@@ -83,7 +83,7 @@
"classnames": "2.5.1",
"dateformat": "5.0.3",
"dayjs": "1.11.20",
- "domhandler": "5.0.3",
+ "domhandler": "6.0.1",
"dompurify": "3.4.5",
"emojibase": "15.3.1",
"emojibase-data": "15.3.2",
@@ -92,7 +92,7 @@
"folds": "2.6.2",
"html-dom-parser": "7.1.0",
"html-react-parser": "6.1.2",
- "i18next": "23.12.2",
+ "i18next": "26.2.0",
"i18next-browser-languagedetector": "8.2.1",
"i18next-http-backend": "4.0.0",
"immer": "11.1.8",
@@ -113,7 +113,7 @@
"react-dom": "18.2.0",
"react-error-boundary": "6.1.1",
"react-google-recaptcha": "2.1.0",
- "react-i18next": "15.0.0",
+ "react-i18next": "17.0.8",
"react-range": "1.10.0",
"react-router-dom": "6.30.3",
"sanitize-html": "2.17.4",
@@ -158,8 +158,8 @@
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "9.1.7",
- "lint-staged": "16.3.2",
- "prettier": "2.8.1",
+ "lint-staged": "17.0.5",
+ "prettier": "3.8.3",
"semantic-release": "25.0.3",
"typescript": "4.9.4",
"vite": "6.4.2",
diff --git a/src/app/components/AccountDataEditor.tsx b/src/app/components/AccountDataEditor.tsx
index 93b570fde..b1192f5f9 100644
--- a/src/app/components/AccountDataEditor.tsx
+++ b/src/app/components/AccountDataEditor.tsx
@@ -54,7 +54,7 @@ function AccountDataEdit({
const { handleKeyDown, operations, getTarget } = useTextAreaCodeEditor(
textAreaRef,
- EDITOR_INTENT_SPACE_COUNT
+ EDITOR_INTENT_SPACE_COUNT,
);
const [submitState, submit] = useAsyncCallback(submitChange);
@@ -278,7 +278,7 @@ export function AccountDataEditor({
const contentJSONStr = useMemo(
() => JSON.stringify(data.content, null, EDITOR_INTENT_SPACE_COUNT),
- [data.content]
+ [data.content],
);
return (
diff --git a/src/app/components/AuthFlowsLoader.tsx b/src/app/components/AuthFlowsLoader.tsx
index 227551f7d..b9a7ed335 100644
--- a/src/app/components/AuthFlowsLoader.tsx
+++ b/src/app/components/AuthFlowsLoader.tsx
@@ -45,7 +45,7 @@ export function AuthFlowsLoader({ fallback, error, children }: AuthFlowsLoaderPr
};
return authFlows;
- }, [mx])
+ }, [mx]),
);
useEffect(() => {
diff --git a/src/app/components/BackRouteHandler.tsx b/src/app/components/BackRouteHandler.tsx
index 3b13e4872..c2c871d82 100644
--- a/src/app/components/BackRouteHandler.tsx
+++ b/src/app/components/BackRouteHandler.tsx
@@ -24,7 +24,7 @@ export function BackRouteHandler({ children }: BackRouteHandlerProps) {
caseSensitive: true,
end: false,
},
- location.pathname
+ location.pathname,
)
) {
navigate(getHomePath());
@@ -37,7 +37,7 @@ export function BackRouteHandler({ children }: BackRouteHandlerProps) {
caseSensitive: true,
end: false,
},
- location.pathname
+ location.pathname,
)
) {
navigate(getDirectPath());
@@ -49,7 +49,7 @@ export function BackRouteHandler({ children }: BackRouteHandlerProps) {
caseSensitive: true,
end: false,
},
- location.pathname
+ location.pathname,
);
const encodedSpaceIdOrAlias = spaceMatch?.params.spaceIdOrAlias;
const decodedSpaceIdOrAlias =
@@ -66,7 +66,7 @@ export function BackRouteHandler({ children }: BackRouteHandlerProps) {
caseSensitive: true,
end: false,
},
- location.pathname
+ location.pathname,
)
) {
navigate(getExplorePath());
@@ -79,7 +79,7 @@ export function BackRouteHandler({ children }: BackRouteHandlerProps) {
caseSensitive: true,
end: false,
},
- location.pathname
+ location.pathname,
)
) {
navigate(getInboxPath());
diff --git a/src/app/components/BackupRestore.tsx b/src/app/components/BackupRestore.tsx
index 9f7dab4d5..0ecf66002 100644
--- a/src/app/components/BackupRestore.tsx
+++ b/src/app/components/BackupRestore.tsx
@@ -157,7 +157,7 @@ export function BackupRestoreTile({ crypto }: BackupRestoreTileProps) {
setRestoreProgress(progress);
},
});
- }, [crypto, setRestoreProgress])
+ }, [crypto, setRestoreProgress]),
);
const handleRestore = () => {
diff --git a/src/app/components/CallEmbedProvider.tsx b/src/app/components/CallEmbedProvider.tsx
index 36864324e..22fdc1ea3 100644
--- a/src/app/components/CallEmbedProvider.tsx
+++ b/src/app/components/CallEmbedProvider.tsx
@@ -104,7 +104,7 @@ function IncomingCall({ dm, info, onIgnore, onAnswer, onReject }: IncomingCallPr
const roomName = useRoomName(room);
const roomAvatar = useRoomAvatar(room, dm);
const avatarUrl = roomAvatar
- ? mxcUrlToHttp(mx, roomAvatar, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, roomAvatar, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
const session = useCallSession(room);
@@ -115,7 +115,7 @@ function IncomingCall({ dm, info, onIgnore, onAnswer, onReject }: IncomingCallPr
if (members.length === 0) {
onIgnore();
}
- }, [room, session, onIgnore])
+ }, [room, session, onIgnore]),
);
const playSound = useCallback(() => {
@@ -312,7 +312,7 @@ function IncomingCallListener({ callEmbed, joined }: IncomingCallListenerProps)
const hasCallPermission = permissions.stateEvent(
StateEvent.GroupCallMemberPrefix,
- mx.getSafeUserId()
+ mx.getSafeUserId(),
);
if (!hasCallPermission) return;
@@ -331,7 +331,7 @@ function IncomingCallListener({ callEmbed, joined }: IncomingCallListenerProps)
setCallInfo(info);
},
- [mx]
+ [mx],
);
useEffect(() => {
@@ -355,7 +355,7 @@ function IncomingCallListener({ callEmbed, joined }: IncomingCallListenerProps)
});
setCallInfo(undefined);
},
- [mx]
+ [mx],
);
const handleAnswer = useCallback(
@@ -364,7 +364,7 @@ function IncomingCallListener({ callEmbed, joined }: IncomingCallListenerProps)
setCallInfo(undefined);
navigateRoom(room.roomId);
},
- [startCall, navigateRoom]
+ [startCall, navigateRoom],
);
if (callInfo && callEmbed?.roomId === callInfo.room.roomId) {
@@ -390,7 +390,7 @@ function CallUtils({ embed }: { embed: CallEmbed }) {
embed,
useCallback(() => {
setCallEmbed(undefined);
- }, [setCallEmbed])
+ }, [setCallEmbed]),
);
return null;
@@ -427,7 +427,7 @@ export function CallEmbedProvider({ children }: CallEmbedProviderProps) {
() => () => {
activeDragCleanupRef.current?.();
},
- []
+ [],
);
// Track previous pipMode to only reset position when first entering pip (not on callVisible changes)
@@ -510,11 +510,11 @@ export function CallEmbedProvider({ children }: CallEmbedProviderProps) {
if (pipDragRef.current.dragged) {
el.style.left = `${Math.max(
0,
- Math.min(window.innerWidth - el.offsetWidth, pipDragRef.current.origLeft + dx)
+ Math.min(window.innerWidth - el.offsetWidth, pipDragRef.current.origLeft + dx),
)}px`;
el.style.top = `${Math.max(
0,
- Math.min(window.innerHeight - el.offsetHeight, pipDragRef.current.origTop + dy)
+ Math.min(window.innerHeight - el.offsetHeight, pipDragRef.current.origTop + dy),
)}px`;
el.style.right = 'auto';
el.style.bottom = 'auto';
@@ -563,11 +563,11 @@ export function CallEmbedProvider({ children }: CallEmbedProviderProps) {
if (pipDragRef.current.dragged) {
el.style.left = `${Math.max(
0,
- Math.min(window.innerWidth - el.offsetWidth, pipDragRef.current.origLeft + dx)
+ Math.min(window.innerWidth - el.offsetWidth, pipDragRef.current.origLeft + dx),
)}px`;
el.style.top = `${Math.max(
0,
- Math.min(window.innerHeight - el.offsetHeight, pipDragRef.current.origTop + dy)
+ Math.min(window.innerHeight - el.offsetHeight, pipDragRef.current.origTop + dy),
)}px`;
el.style.right = 'auto';
el.style.bottom = 'auto';
diff --git a/src/app/components/ConfirmPasswordMatch.tsx b/src/app/components/ConfirmPasswordMatch.tsx
index bb50eb60f..f4a660039 100644
--- a/src/app/components/ConfirmPasswordMatch.tsx
+++ b/src/app/components/ConfirmPasswordMatch.tsx
@@ -7,7 +7,7 @@ type ConfirmPasswordMatchProps = {
match: boolean,
doMatch: () => void,
passRef: RefObject,
- confPassRef: RefObject
+ confPassRef: RefObject,
) => ReactNode;
};
export function ConfirmPasswordMatch({ initialValue, children }: ConfirmPasswordMatchProps) {
@@ -28,7 +28,7 @@ export function ConfirmPasswordMatch({ initialValue, children }: ConfirmPassword
{
wait: 500,
immediate: false,
- }
+ },
);
return children(match, doMatch, passRef, confPassRef);
diff --git a/src/app/components/DeviceVerificationSetup.tsx b/src/app/components/DeviceVerificationSetup.tsx
index d92f14bb2..04990ccc2 100644
--- a/src/app/components/DeviceVerificationSetup.tsx
+++ b/src/app/components/DeviceVerificationSetup.tsx
@@ -27,7 +27,7 @@ import { useAlive } from '../hooks/useAlive';
import { UseStateProvider } from './UseStateProvider';
type UIACallback = (
- authDict: AuthDict | null
+ authDict: AuthDict | null,
) => Promise<[IAuthData, undefined] | [undefined, T]>;
type PerformAction = (authDict: AuthDict | null) => Promise;
@@ -42,7 +42,7 @@ function makeUIAAction(
authData: IAuthData,
performAction: PerformAction,
resolve: (data: T) => void,
- reject: (error?: any) => void
+ reject: (error?: any) => void,
): UIAAction {
const action: UIAAction = {
authData,
@@ -91,7 +91,7 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
setNextAuthData(authData);
}
},
- [uiaAction, alive]
+ [uiaAction, alive],
);
const resetUIA = useCallback(() => {
@@ -118,7 +118,7 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
(err) => {
resetUIA();
reject(err);
- }
+ },
);
if (alive()) {
setUIAAction(action);
@@ -130,7 +130,7 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
reject(error);
});
}),
- [alive, resetUIA]
+ [alive, resetUIA],
);
const [setupState, setup] = useAsyncCallback(
@@ -159,8 +159,8 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
onComplete(recoveryKeyData.encodedPrivateKey);
},
- [mx, onComplete, authUploadDeviceSigningKeys]
- )
+ [mx, onComplete, authUploadDeviceSigningKeys],
+ ),
);
const loading = setupState.status === AsyncStatus.Loading;
@@ -316,7 +316,7 @@ export const DeviceVerificationSetup = forwardRef
);
- }
+ },
);
type DeviceVerificationResetProps = {
onCancel: () => void;
@@ -375,5 +375,5 @@ export const DeviceVerificationReset = forwardRef
);
- }
+ },
);
diff --git a/src/app/components/GifPicker.tsx b/src/app/components/GifPicker.tsx
index cb96c7423..913442433 100644
--- a/src/app/components/GifPicker.tsx
+++ b/src/app/components/GifPicker.tsx
@@ -27,7 +27,7 @@ function GifPickerInner({ onSelect, requestClose, lotusTerminal }: GifPickerInne
onSelect(url, width, height);
requestClose();
},
- [onSelect, requestClose]
+ [onSelect, requestClose],
);
return (
diff --git a/src/app/components/ImageOverlay.tsx b/src/app/components/ImageOverlay.tsx
index ea690924c..271c36b34 100644
--- a/src/app/components/ImageOverlay.tsx
+++ b/src/app/components/ImageOverlay.tsx
@@ -41,5 +41,5 @@ export const ImageOverlay = as<'div', ImageOverlayProps>(
- )
+ ),
);
diff --git a/src/app/components/JoinRulesSwitcher.tsx b/src/app/components/JoinRulesSwitcher.tsx
index bbc0a65dc..134134ad3 100644
--- a/src/app/components/JoinRulesSwitcher.tsx
+++ b/src/app/components/JoinRulesSwitcher.tsx
@@ -33,7 +33,7 @@ export const useJoinRuleIcons = (roomType?: string): JoinRuleIcons =>
[JoinRule.Public]: getRoomIconSrc(Icons, roomType, JoinRule.Public),
[JoinRule.Private]: getRoomIconSrc(Icons, roomType, JoinRule.Private),
}),
- [roomType]
+ [roomType],
);
type JoinRuleLabels = Record;
@@ -47,7 +47,7 @@ export const useRoomJoinRuleLabel = (): JoinRuleLabels =>
[JoinRule.Public]: 'Public',
[JoinRule.Private]: 'Invite Only',
}),
- []
+ [],
);
type JoinRulesSwitcherProps = {
@@ -79,7 +79,7 @@ export function JoinRulesSwitcher({
setCords(undefined);
onChange(selectedRule);
},
- [onChange]
+ [onChange],
);
return (
diff --git a/src/app/components/LogoutDialog.tsx b/src/app/components/LogoutDialog.tsx
index a948ca401..3b474704e 100644
--- a/src/app/components/LogoutDialog.tsx
+++ b/src/app/components/LogoutDialog.tsx
@@ -21,13 +21,13 @@ export const LogoutDialog = forwardRef(
const verificationStatus = useDeviceVerificationStatus(
mx.getCrypto(),
mx.getSafeUserId(),
- mx.getDeviceId() ?? undefined
+ mx.getDeviceId() ?? undefined,
);
const [logoutState, logout] = useAsyncCallback(
useCallback(async () => {
await logoutClient(mx);
- }, [mx])
+ }, [mx]),
);
const ongoingLogout = logoutState.status === AsyncStatus.Loading;
@@ -87,5 +87,5 @@ export const LogoutDialog = forwardRef(
);
- }
+ },
);
diff --git a/src/app/components/ManualVerification.tsx b/src/app/components/ManualVerification.tsx
index f7cde92b4..e451aa450 100644
--- a/src/app/components/ManualVerification.tsx
+++ b/src/app/components/ManualVerification.tsx
@@ -126,7 +126,7 @@ export function ManualVerificationTile({
const [method, setMethod] = useState(
hasPassphrase
? ManualVerificationMethod.RecoveryPassphrase
- : ManualVerificationMethod.RecoveryKey
+ : ManualVerificationMethod.RecoveryKey,
);
const verifyAndRestoreBackup = useCallback(
@@ -143,11 +143,11 @@ export function ManualVerificationTile({
await crypto.loadSessionBackupPrivateKeyFromSecretStorage();
},
- [mx, secretStorageKeyId]
+ [mx, secretStorageKeyId],
);
const [verifyState, handleDecodedRecoveryKey] = useAsyncCallback(
- verifyAndRestoreBackup
+ verifyAndRestoreBackup,
);
const verifying = verifyState.status === AsyncStatus.Loading;
diff --git a/src/app/components/Pdf-viewer/PdfViewer.tsx b/src/app/components/Pdf-viewer/PdfViewer.tsx
index a94328951..3946f74f5 100644
--- a/src/app/components/Pdf-viewer/PdfViewer.tsx
+++ b/src/app/components/Pdf-viewer/PdfViewer.tsx
@@ -43,7 +43,7 @@ export const PdfViewer = as<'div', PdfViewerProps>(
const [pdfJSState, loadPdfJS] = usePdfJSLoader();
const [docState, loadPdfDocument] = usePdfDocumentLoader(
pdfJSState.status === AsyncStatus.Success ? pdfJSState.data : undefined,
- src
+ src,
);
const isLoading =
pdfJSState.status === AsyncStatus.Loading || docState.status === AsyncStatus.Loading;
@@ -257,5 +257,5 @@ export const PdfViewer = as<'div', PdfViewerProps>(
)}
);
- }
+ },
);
diff --git a/src/app/components/RoomNotificationSwitcher.tsx b/src/app/components/RoomNotificationSwitcher.tsx
index 7ce915661..eb3da7a84 100644
--- a/src/app/components/RoomNotificationSwitcher.tsx
+++ b/src/app/components/RoomNotificationSwitcher.tsx
@@ -17,7 +17,7 @@ const useRoomNotificationModes = (): RoomNotificationMode[] =>
RoomNotificationMode.SpecialMessages,
RoomNotificationMode.Mute,
],
- []
+ [],
);
const useRoomNotificationModeStr = (): Record =>
@@ -28,7 +28,7 @@ const useRoomNotificationModeStr = (): Record =>
[RoomNotificationMode.SpecialMessages]: 'Mention & Keywords',
[RoomNotificationMode.Mute]: 'Mute',
}),
- []
+ [],
);
type NotificationModeSwitcherProps = {
@@ -37,7 +37,7 @@ type NotificationModeSwitcherProps = {
children: (
handleOpen: MouseEventHandler,
opened: boolean,
- changing: boolean
+ changing: boolean,
) => ReactNode;
};
export function RoomNotificationModeSwitcher({
diff --git a/src/app/components/SecretStorage.tsx b/src/app/components/SecretStorage.tsx
index c128f3958..9257a9dd5 100644
--- a/src/app/components/SecretStorage.tsx
+++ b/src/app/components/SecretStorage.tsx
@@ -36,7 +36,7 @@ export function SecretStorageRecoveryPassphrase({
passphrase,
salt,
iterations,
- bits
+ bits,
);
const match = await mx.secretStorage.checkKey(decodedRecoveryKey, keyContent as any);
@@ -47,8 +47,8 @@ export function SecretStorageRecoveryPassphrase({
return decodedRecoveryKey;
},
- [mx, keyContent]
- )
+ [mx, keyContent],
+ ),
);
const drivingKey = driveKeyState.status === AsyncStatus.Loading;
@@ -140,8 +140,8 @@ export function SecretStorageRecoveryKey({
return decodedRecoveryKey;
},
- [mx, keyContent]
- )
+ [mx, keyContent],
+ ),
);
const drivingKey = driveKeyState.status === AsyncStatus.Loading;
diff --git a/src/app/components/ServerConfigsLoader.tsx b/src/app/components/ServerConfigsLoader.tsx
index 3c8ce8eb7..0c79dc9eb 100644
--- a/src/app/components/ServerConfigsLoader.tsx
+++ b/src/app/components/ServerConfigsLoader.tsx
@@ -42,7 +42,7 @@ export function ServerConfigsLoader({ children }: ServerConfigsLoaderProps) {
mediaConfig,
authMetadata: validatedAuthMetadata,
};
- }, [mx])
+ }, [mx]),
);
const configs: ServerConfigs =
diff --git a/src/app/components/SpaceChildDirectsProvider.tsx b/src/app/components/SpaceChildDirectsProvider.tsx
index 203363e1e..486985bea 100644
--- a/src/app/components/SpaceChildDirectsProvider.tsx
+++ b/src/app/components/SpaceChildDirectsProvider.tsx
@@ -21,7 +21,7 @@ export function SpaceChildDirectsProvider({
const childDirects = useSpaceChildren(
allRoomsAtom,
spaceId,
- useChildDirectScopeFactory(mx, mDirects, roomToParents)
+ useChildDirectScopeFactory(mx, mDirects, roomToParents),
);
return children(childDirects);
diff --git a/src/app/components/SpaceChildRoomsProvider.tsx b/src/app/components/SpaceChildRoomsProvider.tsx
index 65ed03bec..e1933410e 100644
--- a/src/app/components/SpaceChildRoomsProvider.tsx
+++ b/src/app/components/SpaceChildRoomsProvider.tsx
@@ -21,7 +21,7 @@ export function SpaceChildRoomsProvider({
const childRooms = useSpaceChildren(
allRoomsAtom,
spaceId,
- useChildRoomScopeFactory(mx, mDirects, roomToParents)
+ useChildRoomScopeFactory(mx, mDirects, roomToParents),
);
return children(childRooms);
diff --git a/src/app/components/SpecVersionsLoader.tsx b/src/app/components/SpecVersionsLoader.tsx
index 5ce41d2f5..f44724906 100644
--- a/src/app/components/SpecVersionsLoader.tsx
+++ b/src/app/components/SpecVersionsLoader.tsx
@@ -15,7 +15,7 @@ export function SpecVersionsLoader({
children,
}: SpecVersionsLoaderProps) {
const [state, load] = useAsyncCallback(
- useCallback(() => specVersions(fetch, baseUrl), [baseUrl])
+ useCallback(() => specVersions(fetch, baseUrl), [baseUrl]),
);
const [ignoreError, setIgnoreError] = useState(false);
@@ -38,6 +38,6 @@ export function SpecVersionsLoader({
? state.data
: {
versions: [],
- }
+ },
);
}
diff --git a/src/app/components/create-room/AdditionalCreatorInput.tsx b/src/app/components/create-room/AdditionalCreatorInput.tsx
index 84b922310..82b316cc4 100644
--- a/src/app/components/create-room/AdditionalCreatorInput.tsx
+++ b/src/app/components/create-room/AdditionalCreatorInput.tsx
@@ -35,7 +35,7 @@ import { highlightText, makeHighlightRegex } from '../../plugins/react-custom-ht
export const useAdditionalCreators = (defaultCreators?: string[]) => {
const mx = useMatrixClient();
const [additionalCreators, setAdditionalCreators] = useState(
- () => defaultCreators?.filter((id) => id !== mx.getSafeUserId()) ?? []
+ () => defaultCreators?.filter((id) => id !== mx.getSafeUserId()) ?? [],
);
const addAdditionalCreator = (userId: string) => {
@@ -90,12 +90,12 @@ export function AdditionalCreatorInput({
const [validUserId, setValidUserId] = useState();
const filteredUsers = useMemo(
() => directUsers.filter((userId) => !additionalCreators.includes(userId)),
- [directUsers, additionalCreators]
+ [directUsers, additionalCreators],
);
const [result, search, resetSearch] = useAsyncSearch(
filteredUsers,
getUserIdString,
- SEARCH_OPTIONS
+ SEARCH_OPTIONS,
);
const queryHighlighRegex = result?.query ? makeHighlightRegex([result.query]) : undefined;
diff --git a/src/app/components/create-room/CreateRoomAliasInput.tsx b/src/app/components/create-room/CreateRoomAliasInput.tsx
index e84658c01..37eb2050f 100644
--- a/src/app/components/create-room/CreateRoomAliasInput.tsx
+++ b/src/app/components/create-room/CreateRoomAliasInput.tsx
@@ -42,9 +42,9 @@ export function CreateRoomAliasInput({ disabled }: { disabled?: boolean }) {
throw e;
}
},
- [mx]
+ [mx],
),
- setAliasAvail
+ setAliasAvail,
);
const aliasAvailable: boolean | undefined =
aliasAvail.status === AsyncStatus.Success ? aliasAvail.data : undefined;
diff --git a/src/app/components/create-room/utils.ts b/src/app/components/create-room/utils.ts
index f3e699aa3..394b0226c 100644
--- a/src/app/components/create-room/utils.ts
+++ b/src/app/components/create-room/utils.ts
@@ -15,7 +15,7 @@ import { CreateRoomAccess } from './types';
export const createRoomCreationContent = (
type: RoomType | undefined,
allowFederation: boolean,
- additionalCreators: string[] | undefined
+ additionalCreators: string[] | undefined,
): object => {
const content: Record = {};
if (typeof type === 'string') {
@@ -34,7 +34,7 @@ export const createRoomCreationContent = (
export const createRoomJoinRulesState = (
access: CreateRoomAccess,
parent: Room | undefined,
- knock: boolean
+ knock: boolean,
) => {
let content: RoomJoinRulesEventContent = {
join_rule: knock ? JoinRule.Knock : JoinRule.Invite,
@@ -136,7 +136,7 @@ export const createRoom = async (mx: MatrixClient, data: CreateRoomData): Promis
creation_content: createRoomCreationContent(
data.type,
data.allowFederation,
- data.additionalCreators
+ data.additionalCreators,
),
power_level_content_override:
data.type === RoomType.Call ? createVoiceRoomPowerLevelsOverride() : undefined,
@@ -158,7 +158,7 @@ export const createRoom = async (mx: MatrixClient, data: CreateRoomData): Promis
suggested: false,
via: [getMxIdServer(mx.getUserId() ?? '') ?? ''],
},
- result.room_id
+ result.room_id,
);
}
diff --git a/src/app/components/cutout-card/CutoutCard.tsx b/src/app/components/cutout-card/CutoutCard.tsx
index bf5ddf8b6..32e25f135 100644
--- a/src/app/components/cutout-card/CutoutCard.tsx
+++ b/src/app/components/cutout-card/CutoutCard.tsx
@@ -11,5 +11,5 @@ export const CutoutCard = as<'div', { variant?: TContainerColor }>(
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/editor/Editor.tsx b/src/app/components/editor/Editor.tsx
index bf623edad..bbc2889e7 100644
--- a/src/app/components/editor/Editor.tsx
+++ b/src/app/components/editor/Editor.tsx
@@ -36,7 +36,7 @@ const withInline = (editor: Editor): Editor => {
editor.isInline = (element) =>
[BlockType.Mention, BlockType.Emoticon, BlockType.Link, BlockType.Command].includes(
- element.type
+ element.type,
) || isInline(element);
return editor;
@@ -88,11 +88,11 @@ export const CustomEditor = forwardRef(
onChange,
onPaste,
},
- ref
+ ref,
) => {
const renderElement = useCallback(
(props: RenderElementProps) => ,
- []
+ [],
);
const renderLeaf = useCallback((props: RenderLeafProps) => , []);
@@ -103,7 +103,7 @@ export const CustomEditor = forwardRef(
const shortcutToggled = toggleKeyboardShortcut(editor, evt);
if (shortcutToggled) evt.preventDefault();
},
- [editor, onKeyDown]
+ [editor, onKeyDown],
);
const renderPlaceholder = useCallback(
@@ -115,7 +115,7 @@ export const CustomEditor = forwardRef(
),
- []
+ [],
);
return (
@@ -160,5 +160,5 @@ export const CustomEditor = forwardRef(
);
- }
+ },
);
diff --git a/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx b/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx
index d358ff7df..e3874cb6f 100644
--- a/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx
+++ b/src/app/components/editor/autocomplete/EmoticonAutocomplete.tsx
@@ -51,14 +51,14 @@ export function EmoticonAutocomplete({
const list: Array = [];
return list.concat(
imagePacks.flatMap((pack) => pack.getImages(ImageUsage.Emoticon)),
- emojis
+ emojis,
);
}, [imagePacks]);
const [result, search, resetSearch] = useAsyncSearch(
searchList,
getEmoticonSearchStr,
- SEARCH_OPTIONS
+ SEARCH_OPTIONS,
);
const autoCompleteEmoticon = result ? result.items.slice(0, 20) : recentEmoji;
diff --git a/src/app/components/editor/autocomplete/RoomMentionAutocomplete.tsx b/src/app/components/editor/autocomplete/RoomMentionAutocomplete.tsx
index 377cecab1..2c59d129b 100644
--- a/src/app/components/editor/autocomplete/RoomMentionAutocomplete.tsx
+++ b/src/app/components/editor/autocomplete/RoomMentionAutocomplete.tsx
@@ -91,9 +91,9 @@ export function RoomMentionAutocomplete({
if (alias) return [r.name, alias];
return r.name;
},
- [mx]
+ [mx],
),
- SEARCH_OPTIONS
+ SEARCH_OPTIONS,
);
const autoCompleteRoomIds = result ? result.items.slice(0, 20) : allRooms.slice(0, 20);
@@ -111,7 +111,7 @@ export function RoomMentionAutocomplete({
name.startsWith('#') ? name : `#${name}`,
roomId === roomAliasOrId || mx.getRoom(roomId)?.getCanonicalAlias() === roomAliasOrId,
undefined,
- viaServers
+ viaServers,
);
replaceWithElement(editor, query.range, mentionEl);
moveCursor(editor, true);
diff --git a/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx b/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx
index 7a8012eb4..0c2ffc79e 100644
--- a/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx
+++ b/src/app/components/editor/autocomplete/UserMentionAutocomplete.tsx
@@ -98,7 +98,7 @@ export function UserMentionAutocomplete({
const [result, search, resetSearch] = useAsyncSearch(members, getRoomMemberStr, SEARCH_OPTIONS);
const autoCompleteMembers = (result ? result.items.slice(0, 20) : members.slice(0, 20)).filter(
- withAllowedMembership
+ withAllowedMembership,
);
useEffect(() => {
@@ -110,7 +110,7 @@ export function UserMentionAutocomplete({
const mentionEl = createMentionElement(
uId,
name.startsWith('@') ? name : `@${name}`,
- mx.getUserId() === uId || roomAliasOrId === uId
+ mx.getUserId() === uId || roomAliasOrId === uId,
);
replaceWithElement(editor, query.range, mentionEl);
moveCursor(editor, true);
diff --git a/src/app/components/editor/autocomplete/autocompleteQuery.ts b/src/app/components/editor/autocomplete/autocompleteQuery.ts
index 1baa44a13..72a0b484a 100644
--- a/src/app/components/editor/autocomplete/autocompleteQuery.ts
+++ b/src/app/components/editor/autocomplete/autocompleteQuery.ts
@@ -22,7 +22,7 @@ export type AutocompleteQuery = {
export const getAutocompletePrefix = (
editor: Editor,
queryRange: BaseRange,
- validPrefixes: readonly TPrefix[]
+ validPrefixes: readonly TPrefix[],
): TPrefix | undefined => {
const world = Editor.string(editor, queryRange);
return validPrefixes.find((p) => world.startsWith(p));
@@ -31,13 +31,13 @@ export const getAutocompletePrefix = (
export const getAutocompleteQueryText = (
editor: Editor,
queryRange: BaseRange,
- prefix: string
+ prefix: string,
): string => Editor.string(editor, queryRange).slice(prefix.length);
export const getAutocompleteQuery = (
editor: Editor,
queryRange: BaseRange,
- validPrefixes: readonly TPrefix[]
+ validPrefixes: readonly TPrefix[],
): AutocompleteQuery | undefined => {
const prefix = getAutocompletePrefix(editor, queryRange, validPrefixes);
if (!prefix) return undefined;
diff --git a/src/app/components/editor/input.ts b/src/app/components/editor/input.ts
index 56da58930..70f1a1368 100644
--- a/src/app/components/editor/input.ts
+++ b/src/app/components/editor/input.ts
@@ -77,7 +77,7 @@ const getInlineNodeMarkType = (node: Element): MarkType | undefined => {
const getInlineMarkElement = (
markType: MarkType,
node: Element,
- getChild: (child: ChildNode) => InlineElement[]
+ getChild: (child: ChildNode) => InlineElement[],
): InlineElement[] => {
const children = node.children.flatMap(getChild);
const mdSequence = node.attribs['data-md'];
@@ -115,7 +115,7 @@ const getInlineNonMarkElement = (node: Element): MentionElement | EmoticonElemen
getText(node) || roomMention.roomIdOrAlias,
false,
undefined,
- roomMention.viaServers
+ roomMention.viaServers,
);
}
const eventMention = parseMatrixToRoomEvent(href);
@@ -125,7 +125,7 @@ const getInlineNonMarkElement = (node: Element): MentionElement | EmoticonElemen
getText(node) || eventMention.roomIdOrAlias,
false,
eventMention.eventId,
- eventMention.viaServers
+ eventMention.viaServers,
);
}
}
@@ -167,7 +167,7 @@ const getInlineElement = (node: ChildNode, processText: ProcessTextCallback): In
const parseBlockquoteNode = (
node: Element,
- processText: ProcessTextCallback
+ processText: ProcessTextCallback,
): BlockQuoteElement[] | ParagraphElement[] => {
const quoteLines: Array = [];
let lineHolder: InlineElement[] = [];
@@ -259,7 +259,7 @@ const parseCodeBlockNode = (node: Element): CodeBlockElement[] | ParagraphElemen
const parseListMarkdown = (
node: Element,
processText: ProcessTextCallback,
- depth = 0
+ depth = 0,
): ParagraphElement[] => {
const md = isTag(node) && node.name === 'ul' ? '*' : '-';
const prefix = node.attribs['data-md'] ?? md;
@@ -269,7 +269,7 @@ const parseListMarkdown = (
const digit = digitOrChar ? parseInt(digitOrChar, 10) : undefined;
const lines: ParagraphElement[] = [];
- let lineNo = digit === undefined || Number.isNaN(digit) ? digitOrChar ?? 1 : digit;
+ let lineNo = digit === undefined || Number.isNaN(digit) ? (digitOrChar ?? 1) : digit;
const pushLine = (line: InlineElement[]) => {
lines.push({
type: BlockType.Paragraph,
@@ -353,7 +353,7 @@ const parseListLines = (children: ChildNode[], processText: ProcessTextCallback)
};
const parseListNode = (
node: Element,
- processText: ProcessTextCallback
+ processText: ProcessTextCallback,
): OrderedListElement[] | UnorderedListElement[] | ParagraphElement[] => {
if (node.attribs['data-md'] !== undefined) {
return parseListMarkdown(node, processText);
@@ -385,7 +385,7 @@ const parseListNode = (
};
const parseHeadingNode = (
node: Element,
- processText: ProcessTextCallback
+ processText: ProcessTextCallback,
): HeadingElement | ParagraphElement => {
const children = getInlineElement(node, processText);
@@ -411,7 +411,7 @@ const parseHeadingNode = (
export const domToEditorInput = (
domNodes: ChildNode[],
processText: ProcessTextCallback,
- processLineStartText: ProcessTextCallback
+ processLineStartText: ProcessTextCallback,
): Descendant[] => {
const children: Descendant[] = [];
diff --git a/src/app/components/editor/output.ts b/src/app/components/editor/output.ts
index 2942a8319..2fca27307 100644
--- a/src/app/components/editor/output.ts
+++ b/src/app/components/editor/output.ts
@@ -74,7 +74,7 @@ const elementToCustomHtml = (node: CustomElement, children: string): string => {
case BlockType.Emoticon:
return node.key.startsWith('mxc://')
? `
`
: sanitizeText(node.key);
case BlockType.Link:
@@ -92,12 +92,12 @@ const ignoreHTMLParseInlineMD = (text: string): string =>
text,
HTML_TAG_REG_G,
(match) => match[0],
- (txt) => parseInlineMD(txt)
+ (txt) => parseInlineMD(txt),
).join('');
export const toMatrixCustomHTML = (
node: Descendant | Descendant[],
- opts: OutputOptions
+ opts: OutputOptions,
): string => {
let markdownLines = '';
const parseNode = (n: Descendant, index: number, targetNodes: Descendant[]) => {
diff --git a/src/app/components/editor/utils.ts b/src/app/components/editor/utils.ts
index 90c549c84..512d50f6b 100644
--- a/src/app/components/editor/utils.ts
+++ b/src/app/components/editor/utils.ts
@@ -160,7 +160,7 @@ export const createMentionElement = (
name: string,
highlight: boolean,
eventId?: string,
- viaServers?: string[]
+ viaServers?: string[],
): MentionElement => ({
type: BlockType.Mention,
id,
@@ -180,7 +180,7 @@ export const createEmoticonElement = (key: string, shortcode: string): EmoticonE
export const createLinkElement = (
href: string,
- children: string | FormattedText[]
+ children: string | FormattedText[],
): LinkElement => ({
type: BlockType.Link,
href,
@@ -213,7 +213,7 @@ interface PointUntilCharOptions {
export const getPointUntilChar = (
editor: Editor,
cursorPoint: BasePoint,
- options: PointUntilCharOptions
+ options: PointUntilCharOptions,
): BasePoint | undefined => {
let targetPoint: BasePoint | undefined;
let prevPoint: BasePoint | undefined;
diff --git a/src/app/components/emoji-board/EmojiBoard.tsx b/src/app/components/emoji-board/EmojiBoard.tsx
index 466e2c108..960ca3095 100644
--- a/src/app/components/emoji-board/EmojiBoard.tsx
+++ b/src/app/components/emoji-board/EmojiBoard.tsx
@@ -71,7 +71,7 @@ type StickerGroupItem = {
const useGroups = (
tab: EmojiBoardTab,
- imagePacks: ImagePack[]
+ imagePacks: ImagePack[],
): [EmojiGroupItem[], StickerGroupItem[]] => {
const mx = useMatrixClient();
@@ -309,7 +309,7 @@ function EmojiGroupHolder({
shortcode: emojiInfo.shortcode,
});
},
- [setPreviewData]
+ [setPreviewData],
);
const throttleEmojiHover = useThrottle(handleEmojiPreview, {
@@ -385,7 +385,7 @@ export function EmojiBoard({
const previewAtom = useMemo(
() => createPreviewDataAtom(emojiTab ? DefaultEmojiPreview : undefined),
- [emojiTab]
+ [emojiTab],
);
const activeGroupIdAtom = useMemo(() => atom(undefined), []);
const setActiveGroupId = useSetAtom(activeGroupIdAtom);
@@ -404,7 +404,7 @@ export function EmojiBoard({
const [result, search, resetSearch] = useAsyncSearch(
searchList,
getEmoticonSearchStr,
- SEARCH_OPTIONS
+ SEARCH_OPTIONS,
);
const searchedItems = result?.items.slice(0, 100);
@@ -416,9 +416,9 @@ export function EmojiBoard({
if (term) search(term);
else resetSearch();
},
- [search, resetSearch]
+ [search, resetSearch],
),
- { wait: 200 }
+ { wait: 200 },
);
const contentScrollRef = useRef(null);
diff --git a/src/app/components/emoji-board/useEmojiGroupIcons.ts b/src/app/components/emoji-board/useEmojiGroupIcons.ts
index bef737410..faa1ecc27 100644
--- a/src/app/components/emoji-board/useEmojiGroupIcons.ts
+++ b/src/app/components/emoji-board/useEmojiGroupIcons.ts
@@ -17,5 +17,5 @@ export const useEmojiGroupIcons = (): IEmojiGroupIcons =>
[EmojiGroupId.Symbol]: Icons.Peace,
[EmojiGroupId.Flag]: Icons.Flag,
}),
- []
+ [],
);
diff --git a/src/app/components/emoji-board/useEmojiGroupLabels.ts b/src/app/components/emoji-board/useEmojiGroupLabels.ts
index a1e5cf2c0..3b224891d 100644
--- a/src/app/components/emoji-board/useEmojiGroupLabels.ts
+++ b/src/app/components/emoji-board/useEmojiGroupLabels.ts
@@ -15,5 +15,5 @@ export const useEmojiGroupLabels = (): IEmojiGroupLabels =>
[EmojiGroupId.Symbol]: 'Symbols',
[EmojiGroupId.Flag]: 'Flags',
}),
- []
+ [],
);
diff --git a/src/app/components/event-readers/EventReaders.tsx b/src/app/components/event-readers/EventReaders.tsx
index 37ef858c5..1d61191be 100644
--- a/src/app/components/event-readers/EventReaders.tsx
+++ b/src/app/components/event-readers/EventReaders.tsx
@@ -104,7 +104,8 @@ export const EventReaders = as<'div', EventReadersProps>(
const name = getName(readerId);
const avatarMxcUrl = room.getMember(readerId)?.getMxcAvatarUrl();
const avatarUrl = avatarMxcUrl
- ? mxcUrlToHttp(mx, avatarMxcUrl, useAuthentication, 100, 100, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxcUrl, useAuthentication, 100, 100, 'crop') ??
+ undefined)
: undefined;
const receiptTs = room.getReadReceiptForUserId(readerId)?.data.ts;
@@ -119,7 +120,7 @@ export const EventReaders = as<'div', EventReadersProps>(
space?.roomId,
readerId,
getMouseEventCords(event.nativeEvent),
- 'Bottom'
+ 'Bottom',
);
}}
before={
@@ -162,5 +163,5 @@ export const EventReaders = as<'div', EventReadersProps>(
);
- }
+ },
);
diff --git a/src/app/components/image-editor/ImageEditor.tsx b/src/app/components/image-editor/ImageEditor.tsx
index 53e4662a4..08ad469f8 100644
--- a/src/app/components/image-editor/ImageEditor.tsx
+++ b/src/app/components/image-editor/ImageEditor.tsx
@@ -47,5 +47,5 @@ export const ImageEditor = as<'div', ImageEditorProps>(
);
- }
+ },
);
diff --git a/src/app/components/image-pack-view/ImagePackContent.tsx b/src/app/components/image-pack-view/ImagePackContent.tsx
index a696ebe8b..b26b22194 100644
--- a/src/app/components/image-pack-view/ImagePackContent.tsx
+++ b/src/app/components/image-pack-view/ImagePackContent.tsx
@@ -57,7 +57,7 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
Array.from(savedImages).find(([, img]) => img.shortcode === shortcode) !== undefined;
return hasInSaved;
},
- [imagePack, savedImages, uploadedImages]
+ [imagePack, savedImages, uploadedImages],
);
const pickFiles = useFilePicker(
@@ -74,9 +74,9 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
setFiles((f) => [...f, ...uniqueFiles]);
},
- [hasImageWithShortcode]
+ [hasImageWithShortcode],
),
- true
+ true,
);
const handleMetaSave = useCallback(
@@ -88,10 +88,10 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
...imagePack.meta.content,
...m?.content,
...editedMeta.content,
- })
+ }),
);
},
- [imagePack.meta]
+ [imagePack.meta],
);
const handleMetaCancel = () => setMetaEditing(false);
@@ -104,10 +104,10 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
...imagePack.meta.content,
...m?.content,
usage: usg,
- })
+ }),
);
},
- [imagePack.meta]
+ [imagePack.meta],
);
const handleUploadRemove = useCallback((file: TUploadContent) => {
@@ -123,13 +123,13 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
};
const image = PackImageReader.fromPackImage(
getFileNameWithoutExt(data.file.name),
- packImage
+ packImage,
);
if (!image) return;
handleUploadRemove(data.file);
setUploadedImages((imgs) => [image, ...imgs]);
},
- [handleUploadRemove]
+ [handleUploadRemove],
);
const handleImageEdit = (shortcode: string) => {
@@ -164,7 +164,7 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
? new PackImageReader(
suffixRename(image.shortcode, hasImageWithShortcode),
image.url,
- image.content
+ image.content,
)
: image;
@@ -199,7 +199,7 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
images.forEach((img) => pushImage(img));
return onUpdate?.(pack);
- }, [imagePack, images, savedMeta, uploadedImages, savedImages, deleteImages, onUpdate])
+ }, [imagePack, images, savedMeta, uploadedImages, savedImages, deleteImages, onUpdate]),
);
useEffect(() => {
@@ -384,5 +384,5 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
)}
);
- }
+ },
);
diff --git a/src/app/components/image-pack-view/PackMeta.tsx b/src/app/components/image-pack-view/PackMeta.tsx
index f091f30b9..824426b2e 100644
--- a/src/app/components/image-pack-view/PackMeta.tsx
+++ b/src/app/components/image-pack-view/PackMeta.tsx
@@ -53,7 +53,7 @@ export function ImagePackProfile({ meta, canEdit, onEdit }: ImagePackProfileProp
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
const avatarUrl = meta.avatar
- ? mxcUrlToHttp(mx, meta.avatar, useAuthentication) ?? undefined
+ ? (mxcUrlToHttp(mx, meta.avatar, useAuthentication) ?? undefined)
: undefined;
return (
@@ -101,7 +101,7 @@ export function ImagePackProfileEdit({ meta, onCancel, onSave }: ImagePackProfil
const useAuthentication = useMediaAuthentication();
const [avatar, setAvatar] = useState(meta.avatar);
- const avatarUrl = avatar ? mxcUrlToHttp(mx, avatar, useAuthentication) ?? undefined : undefined;
+ const avatarUrl = avatar ? (mxcUrlToHttp(mx, avatar, useAuthentication) ?? undefined) : undefined;
const [imageFile, setImageFile] = useState();
const avatarFileUrl = useObjectURL(imageFile);
diff --git a/src/app/components/image-pack-view/RoomImagePack.tsx b/src/app/components/image-pack-view/RoomImagePack.tsx
index 92b4ff218..511be3186 100644
--- a/src/app/components/image-pack-view/RoomImagePack.tsx
+++ b/src/app/components/image-pack-view/RoomImagePack.tsx
@@ -32,7 +32,7 @@ export function RoomImagePack({ room, stateKey }: RoomImagePackProps) {
{
roomId: room.roomId,
stateKey,
- }
+ },
);
}, [room.roomId, stateKey]);
const imagePack = useRoomImagePack(room, stateKey) ?? fallbackPack;
@@ -46,10 +46,10 @@ export function RoomImagePack({ room, stateKey }: RoomImagePackProps) {
address.roomId,
StateEvent.PoniesRoomEmotes,
packContent,
- address.stateKey
+ address.stateKey,
);
},
- [mx, imagePack]
+ [mx, imagePack],
);
return (
diff --git a/src/app/components/image-pack-view/UsageSwitcher.tsx b/src/app/components/image-pack-view/UsageSwitcher.tsx
index 1a1eb432d..6823ae0ec 100644
--- a/src/app/components/image-pack-view/UsageSwitcher.tsx
+++ b/src/app/components/image-pack-view/UsageSwitcher.tsx
@@ -29,7 +29,7 @@ export function UsageSelector({ selected, onChange }: UsageSelectorProps) {
const allUsages: ImageUsage[][] = useMemo(
() => [[ImageUsage.Emoticon], [ImageUsage.Sticker], [ImageUsage.Sticker, ImageUsage.Emoticon]],
- []
+ [],
);
return (
diff --git a/src/app/components/image-pack-view/UserImagePack.tsx b/src/app/components/image-pack-view/UserImagePack.tsx
index 4987793d6..05d30acdb 100644
--- a/src/app/components/image-pack-view/UserImagePack.tsx
+++ b/src/app/components/image-pack-view/UserImagePack.tsx
@@ -15,7 +15,7 @@ export function UserImagePack() {
async (packContent: PackContent) => {
await mx.setAccountData(AccountDataEvent.PoniesUserEmotes, packContent);
},
- [mx]
+ [mx],
);
return ;
diff --git a/src/app/components/image-viewer/ImageViewer.tsx b/src/app/components/image-viewer/ImageViewer.tsx
index fae5b0b93..582e17e32 100644
--- a/src/app/components/image-viewer/ImageViewer.tsx
+++ b/src/app/components/image-viewer/ImageViewer.tsx
@@ -93,5 +93,5 @@ export const ImageViewer = as<'div', ImageViewerProps>(
);
- }
+ },
);
diff --git a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx
index 586d2904d..84d56bc6d 100644
--- a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx
+++ b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx
@@ -69,12 +69,12 @@ export function InviteUserPrompt({ room, requestClose }: InviteUserProps) {
const membership = room.getMember(userId)?.membership;
return membership !== Membership.Join;
}),
- [directUsers, room]
+ [directUsers, room],
);
const [result, search, resetSearch] = useAsyncSearch(
filteredUsers,
getUserIdString,
- SEARCH_OPTIONS
+ SEARCH_OPTIONS,
);
const queryHighlighRegex = result?.query
? makeHighlightRegex(result.query.split(' '))
@@ -85,8 +85,8 @@ export function InviteUserPrompt({ room, requestClose }: InviteUserProps) {
async (userId, reason) => {
await mx.invite(room.roomId, userId, reason);
},
- [mx, room]
- )
+ [mx, room],
+ ),
);
const inviting = inviteState.status === AsyncStatus.Loading;
diff --git a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx
index c84480b19..714ee4836 100644
--- a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx
+++ b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx
@@ -32,7 +32,7 @@ export function LeaveRoomPrompt({ roomId, onDone, onCancel }: LeaveRoomPromptPro
const [leaveState, leaveRoom] = useAsyncCallback(
useCallback(async () => {
mx.leave(roomId);
- }, [mx, roomId])
+ }, [mx, roomId]),
);
const handleLeave = () => {
diff --git a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx
index d4c59e379..55ec3f286 100644
--- a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx
+++ b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx
@@ -32,7 +32,7 @@ export function LeaveSpacePrompt({ roomId, onDone, onCancel }: LeaveSpacePromptP
const [leaveState, leaveRoom] = useAsyncCallback(
useCallback(async () => {
mx.leave(roomId);
- }, [mx, roomId])
+ }, [mx, roomId]),
);
const handleLeave = () => {
diff --git a/src/app/components/media/Image.tsx b/src/app/components/media/Image.tsx
index dda21a53f..3eaa808b1 100644
--- a/src/app/components/media/Image.tsx
+++ b/src/app/components/media/Image.tsx
@@ -5,5 +5,5 @@ import * as css from './media.css';
export const Image = forwardRef>(
({ className, alt, ...props }, ref) => (
- )
+ ),
);
diff --git a/src/app/components/media/MediaControls.tsx b/src/app/components/media/MediaControls.tsx
index 95a344aba..fb8565d22 100644
--- a/src/app/components/media/MediaControls.tsx
+++ b/src/app/components/media/MediaControls.tsx
@@ -23,5 +23,5 @@ export const MediaControl = as<'div', MediaControlProps>(
{after && {after}}
{children}
- )
+ ),
);
diff --git a/src/app/components/media/Video.tsx b/src/app/components/media/Video.tsx
index 03108c329..7360f23fb 100644
--- a/src/app/components/media/Video.tsx
+++ b/src/app/components/media/Video.tsx
@@ -6,5 +6,5 @@ export const Video = forwardRef (
// eslint-disable-next-line jsx-a11y/media-has-caption
- )
+ ),
);
diff --git a/src/app/components/member-tile/MemberTile.tsx b/src/app/components/member-tile/MemberTile.tsx
index d36d46c29..4915edd32 100644
--- a/src/app/components/member-tile/MemberTile.tsx
+++ b/src/app/components/member-tile/MemberTile.tsx
@@ -49,5 +49,5 @@ export const MemberTile = as<'button', MemberTileProps>(
{after}
);
- }
+ },
);
diff --git a/src/app/components/message/FileHeader.tsx b/src/app/components/message/FileHeader.tsx
index 44ce4d384..fa4a681b3 100644
--- a/src/app/components/message/FileHeader.tsx
+++ b/src/app/components/message/FileHeader.tsx
@@ -36,7 +36,7 @@ export function FileDownloadButton({ filename, url, mimeType, encInfo }: FileDow
const fileURL = URL.createObjectURL(fileContent);
FileSaver.saveAs(fileURL, filename);
return fileURL;
- }, [mx, url, useAuthentication, mimeType, encInfo, filename])
+ }, [mx, url, useAuthentication, mimeType, encInfo, filename]),
);
const downloading = downloadState.status === AsyncStatus.Loading;
@@ -52,8 +52,8 @@ export function FileDownloadButton({ filename, url, mimeType, encInfo }: FileDow
downloading
? 'Downloading...'
: hasError
- ? 'Download failed, click to retry'
- : 'Download file'
+ ? 'Download failed, click to retry'
+ : 'Download file'
}
>
{downloading ? (
diff --git a/src/app/components/message/Reaction.tsx b/src/app/components/message/Reaction.tsx
index 34b2dc6e5..8562c7b9a 100644
--- a/src/app/components/message/Reaction.tsx
+++ b/src/app/components/message/Reaction.tsx
@@ -60,7 +60,7 @@ export function ReactionTooltipMsg({ room, reaction, events }: ReactionTooltipMs
(ev: MatrixEvent) =>
getMemberDisplayName(room, ev.getSender() ?? 'Unknown') ??
getMxIdLocalPart(ev.getSender() ?? 'Unknown') ??
- 'Unknown'
+ 'Unknown',
);
return (
diff --git a/src/app/components/message/Reply.tsx b/src/app/components/message/Reply.tsx
index 57bf2af99..28096b507 100644
--- a/src/app/components/message/Reply.tsx
+++ b/src/app/components/message/Reply.tsx
@@ -34,7 +34,7 @@ export const ReplyLayout = as<'div', ReplyLayoutProps>(
{children}
- )
+ ),
);
export const ThreadIndicator = as<'div'>(({ ...props }, ref) => (
@@ -75,12 +75,12 @@ export const Reply = as<'div', ReplyProps>(
legacyUsernameColor,
...props
},
- ref
+ ref,
) => {
const placeholderWidth = useMemo(() => randomNumberBetween(40, 400), []);
const getFromLocalTimeline = useCallback(
() => timelineSet?.findEventById(replyEventId),
- [timelineSet, replyEventId]
+ [timelineSet, replyEventId],
);
const replyEvent = useRoomEvent(room, replyEventId, getFromLocalTimeline);
@@ -134,5 +134,5 @@ export const Reply = as<'div', ReplyProps>(
);
- }
+ },
);
diff --git a/src/app/components/message/Time.tsx b/src/app/components/message/Time.tsx
index 3eab5cc2f..29716c581 100644
--- a/src/app/components/message/Time.tsx
+++ b/src/app/components/message/Time.tsx
@@ -41,5 +41,5 @@ export const Time = as<'span', TimeProps & ComponentProps>(
{time}
);
- }
+ },
);
diff --git a/src/app/components/message/attachment/Attachment.tsx b/src/app/components/message/attachment/Attachment.tsx
index 4b0b71f31..842713deb 100644
--- a/src/app/components/message/attachment/Attachment.tsx
+++ b/src/app/components/message/attachment/Attachment.tsx
@@ -12,7 +12,7 @@ export const Attachment = as<'div', css.AttachmentVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
export const AttachmentHeader = as<'div'>(({ className, ...props }, ref) => (
diff --git a/src/app/components/message/content/AudioContent.tsx b/src/app/components/message/content/AudioContent.tsx
index 34bc1583d..169c37658 100644
--- a/src/app/components/message/content/AudioContent.tsx
+++ b/src/app/components/message/content/AudioContent.tsx
@@ -60,7 +60,7 @@ export function AudioContent({
? await downloadEncryptedMedia(mediaUrl, (encBuf) => decryptFile(encBuf, mimeType, encInfo))
: await downloadMedia(mediaUrl);
return URL.createObjectURL(fileContent);
- }, [mx, url, useAuthentication, mimeType, encInfo])
+ }, [mx, url, useAuthentication, mimeType, encInfo]),
);
const audioRef = useRef(null);
@@ -75,7 +75,7 @@ export function AudioContent({
URL.revokeObjectURL(srcState.data);
}
},
- [srcState]
+ [srcState],
);
const [currentTime, setCurrentTime] = useState(0);
@@ -94,7 +94,7 @@ export function AudioContent({
}, []);
useMediaPlayTimeCallback(
getAudioRef,
- useThrottle(handlePlayTimeCallback, PLAY_TIME_THROTTLE_OPS)
+ useThrottle(handlePlayTimeCallback, PLAY_TIME_THROTTLE_OPS),
);
const handlePlay = () => {
@@ -162,7 +162,7 @@ export function AudioContent({
{`${secondsToMinutesAndSeconds(
- currentTime
+ currentTime,
)} / ${secondsToMinutesAndSeconds(duration)}`}
>
),
diff --git a/src/app/components/message/content/FallbackContent.tsx b/src/app/components/message/content/FallbackContent.tsx
index a1988fe4a..7f3173ab7 100644
--- a/src/app/components/message/content/FallbackContent.tsx
+++ b/src/app/components/message/content/FallbackContent.tsx
@@ -12,7 +12,7 @@ export const MessageDeletedContent = as<'div', { children?: never; reason?: stri
{reason ? `This message has been deleted — ${reason}` : 'This message has been deleted'}
- )
+ ),
);
export const MessageUnsupportedContent = as<'div', { children?: never }>(({ ...props }, ref) => (
diff --git a/src/app/components/message/content/FileContent.tsx b/src/app/components/message/content/FileContent.tsx
index 7e127f2a7..0ff889229 100644
--- a/src/app/components/message/content/FileContent.tsx
+++ b/src/app/components/message/content/FileContent.tsx
@@ -95,7 +95,7 @@ export function ReadTextFile({ body, mimeType, url, encInfo, renderViewer }: Rea
const text = fileContent.text();
setTextViewer(true);
return text;
- }, [mx, useAuthentication, mimeType, encInfo, url])
+ }, [mx, useAuthentication, mimeType, encInfo, url]),
);
return (
@@ -184,7 +184,7 @@ export function ReadPdfFile({ body, mimeType, url, encInfo, renderViewer }: Read
: await downloadMedia(mediaUrl);
setPdfViewer(true);
return URL.createObjectURL(fileContent);
- }, [mx, url, useAuthentication, mimeType, encInfo])
+ }, [mx, url, useAuthentication, mimeType, encInfo]),
);
return (
@@ -264,7 +264,7 @@ export function DownloadFile({ body, mimeType, url, info, encInfo }: DownloadFil
const fileURL = URL.createObjectURL(fileContent);
FileSaver.saveAs(fileURL, body);
return fileURL;
- }, [mx, url, useAuthentication, mimeType, encInfo, body])
+ }, [mx, url, useAuthentication, mimeType, encInfo, body]),
);
return downloadState.status === AsyncStatus.Error ? (
@@ -309,5 +309,5 @@ export const FileContent = as<'div', FileContentProps>(
{mimeType === 'application/pdf' && renderAsPdfFile()}
{children}
- )
+ ),
);
diff --git a/src/app/components/message/content/ImageContent.tsx b/src/app/components/message/content/ImageContent.tsx
index 4f1d9c751..d9848e47d 100644
--- a/src/app/components/message/content/ImageContent.tsx
+++ b/src/app/components/message/content/ImageContent.tsx
@@ -74,7 +74,7 @@ export const ImageContent = as<'div', ImageContentProps>(
renderImage,
...props
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
@@ -91,12 +91,12 @@ export const ImageContent = as<'div', ImageContentProps>(
if (!mediaUrl) throw new Error('Invalid media URL');
if (encInfo) {
const fileContent = await downloadEncryptedMedia(mediaUrl, (encBuf) =>
- decryptFile(encBuf, mimeType ?? FALLBACK_MIMETYPE, encInfo)
+ decryptFile(encBuf, mimeType ?? FALLBACK_MIMETYPE, encInfo),
);
return URL.createObjectURL(fileContent);
}
return mediaUrl;
- }, [mx, url, useAuthentication, mimeType, encInfo])
+ }, [mx, url, useAuthentication, mimeType, encInfo]),
);
const handleLoad = () => {
@@ -257,5 +257,5 @@ export const ImageContent = as<'div', ImageContentProps>(
)}
);
- }
+ },
);
diff --git a/src/app/components/message/content/PollContent.tsx b/src/app/components/message/content/PollContent.tsx
index 7fc408196..4a4455772 100644
--- a/src/app/components/message/content/PollContent.tsx
+++ b/src/app/components/message/content/PollContent.tsx
@@ -34,7 +34,7 @@ function computeVotes(
mx: ReturnType,
roomId: string,
eventId: string,
- isStable: boolean
+ isStable: boolean,
): VoteState {
const empty: VoteState = { counts: new Map(), myVote: null, total: 0 };
const room = mx.getRoom(roomId);
@@ -44,12 +44,12 @@ function computeVotes(
const stableRels = timelineSet.relations.getChildEventsForEvent(
eventId,
'm.reference',
- 'm.poll.response'
+ 'm.poll.response',
);
const unstableRels = timelineSet.relations.getChildEventsForEvent(
eventId,
'org.matrix.msc3381.poll.response' as any,
- 'org.matrix.msc3381.poll.response'
+ 'org.matrix.msc3381.poll.response',
);
// Collect all response events; per-sender keep only latest
@@ -129,12 +129,12 @@ export function PollContent({
const stableRels = timelineSet.relations.getChildEventsForEvent(
eventId,
'm.reference',
- 'm.poll.response'
+ 'm.poll.response',
);
const unstableRels = timelineSet.relations.getChildEventsForEvent(
eventId,
'org.matrix.msc3381.poll.response' as any,
- 'org.matrix.msc3381.poll.response'
+ 'org.matrix.msc3381.poll.response',
);
stableRels?.on(RelationsEvent.Add, refresh);
diff --git a/src/app/components/message/content/ThumbnailContent.tsx b/src/app/components/message/content/ThumbnailContent.tsx
index aa9171aa5..099c934a8 100644
--- a/src/app/components/message/content/ThumbnailContent.tsx
+++ b/src/app/components/message/content/ThumbnailContent.tsx
@@ -27,13 +27,13 @@ export function ThumbnailContent({ info, renderImage }: ThumbnailContentProps) {
if (!mediaUrl) throw new Error('Invalid media URL');
if (encInfo) {
const fileContent = await downloadEncryptedMedia(mediaUrl, (encBuf) =>
- decryptFile(encBuf, thumbInfo.mimetype ?? FALLBACK_MIMETYPE, encInfo)
+ decryptFile(encBuf, thumbInfo.mimetype ?? FALLBACK_MIMETYPE, encInfo),
);
return URL.createObjectURL(fileContent);
}
return mediaUrl;
- }, [mx, info, useAuthentication])
+ }, [mx, info, useAuthentication]),
);
useEffect(() => {
diff --git a/src/app/components/message/content/VideoContent.tsx b/src/app/components/message/content/VideoContent.tsx
index b33ec2720..7dc78fa8e 100644
--- a/src/app/components/message/content/VideoContent.tsx
+++ b/src/app/components/message/content/VideoContent.tsx
@@ -69,7 +69,7 @@ export const VideoContent = as<'div', VideoContentProps>(
renderVideo,
...props
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
@@ -85,11 +85,11 @@ export const VideoContent = as<'div', VideoContentProps>(
if (!mediaUrl) throw new Error('Invalid media URL');
const fileContent = encInfo
? await downloadEncryptedMedia(mediaUrl, (encBuf) =>
- decryptFile(encBuf, mimeType, encInfo)
+ decryptFile(encBuf, mimeType, encInfo),
)
: await downloadMedia(mediaUrl);
return URL.createObjectURL(fileContent);
- }, [mx, url, useAuthentication, mimeType, encInfo])
+ }, [mx, url, useAuthentication, mimeType, encInfo]),
);
const handleLoad = () => {
@@ -237,5 +237,5 @@ export const VideoContent = as<'div', VideoContentProps>(
)}
);
- }
+ },
);
diff --git a/src/app/components/message/layout/Base.tsx b/src/app/components/message/layout/Base.tsx
index ac196a5b7..0d9b8bd92 100644
--- a/src/app/components/message/layout/Base.tsx
+++ b/src/app/components/message/layout/Base.tsx
@@ -8,12 +8,12 @@ export const MessageBase = as<'div', css.MessageBaseVariants>(
- )
+ ),
);
export const AvatarBase = as<'span'>(({ className, ...props }, ref) => (
@@ -38,5 +38,5 @@ export const MessageTextBody = as<'div', css.MessageTextBodyVariants & { notice?
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/message/layout/Bubble.tsx b/src/app/components/message/layout/Bubble.tsx
index 93ff84bcb..965d7971d 100644
--- a/src/app/components/message/layout/Bubble.tsx
+++ b/src/app/components/message/layout/Bubble.tsx
@@ -59,5 +59,5 @@ export const BubbleLayout = as<'div', BubbleLayoutProps>(
)}
- )
+ ),
);
diff --git a/src/app/components/message/layout/Compact.tsx b/src/app/components/message/layout/Compact.tsx
index a033919f7..83522ae4d 100644
--- a/src/app/components/message/layout/Compact.tsx
+++ b/src/app/components/message/layout/Compact.tsx
@@ -14,5 +14,5 @@ export const CompactLayout = as<'div', CompactLayoutProps>(
{children}
- )
+ ),
);
diff --git a/src/app/components/message/placeholder/CompactPlaceholder.tsx b/src/app/components/message/placeholder/CompactPlaceholder.tsx
index e6168ae3e..5abd24be0 100644
--- a/src/app/components/message/placeholder/CompactPlaceholder.tsx
+++ b/src/app/components/message/placeholder/CompactPlaceholder.tsx
@@ -23,5 +23,5 @@ export const CompactPlaceholder = as<'div', { variant?: ContainerColor }>(
);
- }
+ },
);
diff --git a/src/app/components/message/placeholder/DefaultPlaceholder.tsx b/src/app/components/message/placeholder/DefaultPlaceholder.tsx
index 725ac4b9f..7b3e8c6ed 100644
--- a/src/app/components/message/placeholder/DefaultPlaceholder.tsx
+++ b/src/app/components/message/placeholder/DefaultPlaceholder.tsx
@@ -35,5 +35,5 @@ export const DefaultPlaceholder = as<'div', { variant?: ContainerColor }>(
);
- }
+ },
);
diff --git a/src/app/components/message/placeholder/LinePlaceholder.tsx b/src/app/components/message/placeholder/LinePlaceholder.tsx
index 58fc52c0e..521df0e04 100644
--- a/src/app/components/message/placeholder/LinePlaceholder.tsx
+++ b/src/app/components/message/placeholder/LinePlaceholder.tsx
@@ -11,5 +11,5 @@ export const LinePlaceholder = as<'div', css.LinePlaceholderVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/nav/NavCategoryHeader.tsx b/src/app/components/nav/NavCategoryHeader.tsx
index e6ae700aa..d11184266 100644
--- a/src/app/components/nav/NavCategoryHeader.tsx
+++ b/src/app/components/nav/NavCategoryHeader.tsx
@@ -15,5 +15,5 @@ export const NavCategoryHeader = as<'div', NavCategoryHeaderProps>(
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/nav/NavItem.tsx b/src/app/components/nav/NavItem.tsx
index 1ec1257fb..7967ccc24 100644
--- a/src/app/components/nav/NavItem.tsx
+++ b/src/app/components/nav/NavItem.tsx
@@ -23,11 +23,11 @@ export const NavItem = as<
export const NavLink = forwardRef>(
({ className, ...props }, ref) => (
- )
+ ),
);
export const NavButton = as<'button'>(
({ as: AsNavButton = 'button', className, ...props }, ref) => (
- )
+ ),
);
diff --git a/src/app/components/nav/NavItemContent.tsx b/src/app/components/nav/NavItemContent.tsx
index d6a5d1310..e6000f23c 100644
--- a/src/app/components/nav/NavItemContent.tsx
+++ b/src/app/components/nav/NavItemContent.tsx
@@ -6,5 +6,5 @@ import * as css from './styles.css';
export const NavItemContent = as<'p', ComponentProps>(
({ className, ...props }, ref) => (
- )
+ ),
);
diff --git a/src/app/components/nav/NavItemOptions.tsx b/src/app/components/nav/NavItemOptions.tsx
index 1c2ffd3f8..10b6f6ac6 100644
--- a/src/app/components/nav/NavItemOptions.tsx
+++ b/src/app/components/nav/NavItemOptions.tsx
@@ -13,5 +13,5 @@ export const NavItemOptions = as<'div', ComponentProps>(
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/page/Page.tsx b/src/app/components/page/Page.tsx
index a54563855..cda7ec5e8 100644
--- a/src/app/components/page/Page.tsx
+++ b/src/app/components/page/Page.tsx
@@ -53,7 +53,7 @@ export const PageNavHeader = as<'header', css.PageNavHeaderVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
export function PageNavContent({
@@ -98,7 +98,7 @@ export const PageHeader = as<'div', css.PageHeaderVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
export const PageContent = as<'div'>(({ className, ...props }, ref) => (
@@ -127,7 +127,7 @@ export const PageHeroSection = as<'div', ComponentProps>(
{...props}
ref={ref}
/>
- )
+ ),
);
export function PageHero({
diff --git a/src/app/components/password-input/PasswordInput.tsx b/src/app/components/password-input/PasswordInput.tsx
index 3e1e278d7..17205341c 100644
--- a/src/app/components/password-input/PasswordInput.tsx
+++ b/src/app/components/password-input/PasswordInput.tsx
@@ -42,5 +42,5 @@ export const PasswordInput = forwardRef(
)}
);
- }
+ },
);
diff --git a/src/app/components/power/PowerColorBadge.tsx b/src/app/components/power/PowerColorBadge.tsx
index 497385b7b..d018fe05c 100644
--- a/src/app/components/power/PowerColorBadge.tsx
+++ b/src/app/components/power/PowerColorBadge.tsx
@@ -17,5 +17,5 @@ export const PowerColorBadge = as<'span', PowerColorBadgeProps>(
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/power/PowerSelector.tsx b/src/app/components/power/PowerSelector.tsx
index 2b3b48c3d..dbb1584ef 100644
--- a/src/app/components/power/PowerSelector.tsx
+++ b/src/app/components/power/PowerSelector.tsx
@@ -46,7 +46,7 @@ export const PowerSelector = forwardRef(
- )
+ ),
);
type PowerSwitcherProps = PowerSelectorProps & {
diff --git a/src/app/components/presence/Presence.tsx b/src/app/components/presence/Presence.tsx
index 108852f27..a5b396b88 100644
--- a/src/app/components/presence/Presence.tsx
+++ b/src/app/components/presence/Presence.tsx
@@ -76,5 +76,5 @@ export const AvatarPresence = as<'div', AvatarPresenceProps>(
)}
{children}
- )
+ ),
);
diff --git a/src/app/components/read-receipt-avatars/ReadReceiptAvatars.tsx b/src/app/components/read-receipt-avatars/ReadReceiptAvatars.tsx
index 7e3ed08be..aec530b7c 100644
--- a/src/app/components/read-receipt-avatars/ReadReceiptAvatars.tsx
+++ b/src/app/components/read-receipt-avatars/ReadReceiptAvatars.tsx
@@ -93,7 +93,7 @@ export function ReadReceiptAvatars({
const name = getMemberDisplayName(room, userId) ?? getMxIdLocalPart(userId) ?? userId;
const avatarMxc = room.getMember(userId)?.getMxcAvatarUrl();
const avatarUrl = avatarMxc
- ? mxcUrlToHttp(mx, avatarMxc, useAuthentication, 32, 32, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxc, useAuthentication, 32, 32, 'crop') ?? undefined)
: undefined;
return (
gridRef.current, []),
- useCallback((width, _, target) => setGridColumnCount(target, getGridColumnCount(width)), [])
+ useCallback((width, _, target) => setGridColumnCount(target, getGridColumnCount(width)), []),
);
return (
@@ -159,14 +159,14 @@ export const RoomCard = as<'div', RoomCardProps>(
renderTopicViewer,
...props
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
const joinedRoomId = useJoinedRoomId(allRooms, roomIdOrAlias);
const joinedRoom = mx.getRoom(joinedRoomId);
const [topicEvent, setTopicEvent] = useState(() =>
- joinedRoom ? getStateEvent(joinedRoom, StateEvent.RoomTopic) : undefined
+ joinedRoom ? getStateEvent(joinedRoom, StateEvent.RoomTopic) : undefined,
);
const fallbackName = getMxIdLocalPart(roomIdOrAlias) ?? roomIdOrAlias;
@@ -193,12 +193,15 @@ export const RoomCard = as<'div', RoomCardProps>(
setTopicEvent(getStateEvent(joinedRoom, StateEvent.RoomTopic));
}
},
- [joinedRoom]
- )
+ [joinedRoom],
+ ),
);
const [joinState, join] = useAsyncCallback(
- useCallback(() => mx.joinRoom(roomIdOrAlias, { viaServers }), [mx, roomIdOrAlias, viaServers])
+ useCallback(
+ () => mx.joinRoom(roomIdOrAlias, { viaServers }),
+ [mx, roomIdOrAlias, viaServers],
+ ),
);
const joining =
joinState.status === AsyncStatus.Loading || joinState.status === AsyncStatus.Success;
@@ -316,5 +319,5 @@ export const RoomCard = as<'div', RoomCardProps>(
)}
);
- }
+ },
);
diff --git a/src/app/components/room-intro/RoomIntro.tsx b/src/app/components/room-intro/RoomIntro.tsx
index ce550992d..4719d3a56 100644
--- a/src/app/components/room-intro/RoomIntro.tsx
+++ b/src/app/components/room-intro/RoomIntro.tsx
@@ -43,7 +43,7 @@ export const RoomIntro = as<'div', RoomIntroProps>(({ room, ...props }, ref) =>
const prevRoomId = createContent?.predecessor?.room_id;
const [prevRoomState, joinPrevRoom] = useAsyncCallback(
- useCallback(async (roomId: string) => mx.joinRoom(roomId), [mx])
+ useCallback(async (roomId: string) => mx.joinRoom(roomId), [mx]),
);
const [hour24Clock] = useSetting(settingsAtom, 'hour24Clock');
diff --git a/src/app/components/scroll-top-container/ScrollTopContainer.tsx b/src/app/components/scroll-top-container/ScrollTopContainer.tsx
index e91d0580a..b68fa6727 100644
--- a/src/app/components/scroll-top-container/ScrollTopContainer.tsx
+++ b/src/app/components/scroll-top-container/ScrollTopContainer.tsx
@@ -27,10 +27,10 @@ export const ScrollTopContainer = as<
onVisibilityChange?.(entry.isIntersecting);
}
},
- [anchorRef, onVisibilityChange]
+ [anchorRef, onVisibilityChange],
),
useCallback(() => ({ root: scrollRef?.current }), [scrollRef]),
- useCallback(() => anchorRef.current, [anchorRef])
+ useCallback(() => anchorRef.current, [anchorRef]),
);
if (onTop) return null;
diff --git a/src/app/components/sequence-card/SequenceCard.tsx b/src/app/components/sequence-card/SequenceCard.tsx
index 46d5ea0f7..9f867ab03 100644
--- a/src/app/components/sequence-card/SequenceCard.tsx
+++ b/src/app/components/sequence-card/SequenceCard.tsx
@@ -20,19 +20,19 @@ export const SequenceCard = as<
mergeBorder,
...props
},
- ref
+ ref,
) => (
- )
+ ),
);
diff --git a/src/app/components/sidebar/SidebarItem.tsx b/src/app/components/sidebar/SidebarItem.tsx
index b23772bb7..86935f8a4 100644
--- a/src/app/components/sidebar/SidebarItem.tsx
+++ b/src/app/components/sidebar/SidebarItem.tsx
@@ -10,7 +10,7 @@ export const SidebarItem = as<'div', css.SidebarItemVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
export const SidebarItemBadge = as<'div', css.SidebarItemBadgeVariants>(
@@ -20,7 +20,7 @@ export const SidebarItemBadge = as<'div', css.SidebarItemBadgeVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
export function SidebarItemTooltip({
@@ -57,7 +57,7 @@ export const SidebarAvatar = as<'div', css.SidebarAvatarVariants & ComponentProp
{...props}
ref={ref}
/>
- )
+ ),
);
export const SidebarFolder = as<'div', css.SidebarFolderVariants>(
@@ -67,7 +67,7 @@ export const SidebarFolder = as<'div', css.SidebarFolderVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
export const SidebarFolderDropTarget = as<'div', css.SidebarFolderDropTargetVariants>(
@@ -77,5 +77,5 @@ export const SidebarFolderDropTarget = as<'div', css.SidebarFolderDropTargetVari
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/sidebar/SidebarStack.tsx b/src/app/components/sidebar/SidebarStack.tsx
index c0e976c8e..253d7cc15 100644
--- a/src/app/components/sidebar/SidebarStack.tsx
+++ b/src/app/components/sidebar/SidebarStack.tsx
@@ -6,5 +6,5 @@ import * as css from './Sidebar.css';
export const SidebarStack = as<'div'>(
({ as: AsSidebarStack = 'div', className, ...props }, ref) => (
- )
+ ),
);
diff --git a/src/app/components/stacked-avatar/StackedAvatar.tsx b/src/app/components/stacked-avatar/StackedAvatar.tsx
index 2f2197794..14b05d427 100644
--- a/src/app/components/stacked-avatar/StackedAvatar.tsx
+++ b/src/app/components/stacked-avatar/StackedAvatar.tsx
@@ -14,5 +14,5 @@ export const StackedAvatar = as<'span', css.StackedAvatarVariants & StackedAvata
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/components/text-viewer/TextViewer.tsx b/src/app/components/text-viewer/TextViewer.tsx
index d7e1e8276..c2f29b707 100644
--- a/src/app/components/text-viewer/TextViewer.tsx
+++ b/src/app/components/text-viewer/TextViewer.tsx
@@ -28,7 +28,7 @@ export const TextViewerContent = forwardRef
- )
+ ),
);
export type TextViewerProps = {
@@ -83,5 +83,5 @@ export const TextViewer = as<'div', TextViewerProps>(
);
- }
+ },
);
diff --git a/src/app/components/time-date/DatePicker.tsx b/src/app/components/time-date/DatePicker.tsx
index faa43a3fe..d822a5596 100644
--- a/src/app/components/time-date/DatePicker.tsx
+++ b/src/app/components/time-date/DatePicker.tsx
@@ -125,5 +125,5 @@ export const DatePicker = forwardRef(
);
- }
+ },
);
diff --git a/src/app/components/time-date/TimePicker.tsx b/src/app/components/time-date/TimePicker.tsx
index c835ed096..399c996f4 100644
--- a/src/app/components/time-date/TimePicker.tsx
+++ b/src/app/components/time-date/TimePicker.tsx
@@ -149,5 +149,5 @@ export const TimePicker = forwardRef(
);
- }
+ },
);
diff --git a/src/app/components/typing-indicator/TypingIndicator.tsx b/src/app/components/typing-indicator/TypingIndicator.tsx
index f8daa45e5..78d0c3a18 100644
--- a/src/app/components/typing-indicator/TypingIndicator.tsx
+++ b/src/app/components/typing-indicator/TypingIndicator.tsx
@@ -21,5 +21,5 @@ export const TypingIndicator = as<'div', TypingIndicatorProps>(
- )
+ ),
);
diff --git a/src/app/components/uia-stages/EmailStage.tsx b/src/app/components/uia-stages/EmailStage.tsx
index 9139cfe11..9c9ec60ab 100644
--- a/src/app/components/uia-stages/EmailStage.tsx
+++ b/src/app/components/uia-stages/EmailStage.tsx
@@ -103,14 +103,14 @@ export function EmailStageDialog({
session,
});
},
- [submitAuthDict, session, clientSecret]
+ [submitAuthDict, session, clientSecret],
);
const handleEmailSubmit = useCallback(
(userEmail: string) => {
requestEmailToken(userEmail, clientSecret);
},
- [clientSecret, requestEmailToken]
+ [clientSecret, requestEmailToken],
);
useEffect(() => {
diff --git a/src/app/components/uia-stages/RegistrationTokenStage.tsx b/src/app/components/uia-stages/RegistrationTokenStage.tsx
index 6b6595695..10d374126 100644
--- a/src/app/components/uia-stages/RegistrationTokenStage.tsx
+++ b/src/app/components/uia-stages/RegistrationTokenStage.tsx
@@ -91,7 +91,7 @@ export function RegistrationTokenStageDialog({
session,
});
},
- [session, submitAuthDict]
+ [session, submitAuthDict],
);
useEffect(() => {
diff --git a/src/app/components/uia-stages/TermsStage.tsx b/src/app/components/uia-stages/TermsStage.tsx
index bf1859da6..00417a0a1 100644
--- a/src/app/components/uia-stages/TermsStage.tsx
+++ b/src/app/components/uia-stages/TermsStage.tsx
@@ -47,7 +47,7 @@ export function AutoTermsStageDialog({ stageData, submitAuthDict, onCancel }: St
type: AuthType.Terms,
session,
}),
- [session, submitAuthDict]
+ [session, submitAuthDict],
);
useEffect(() => {
diff --git a/src/app/components/upload-board/UploadBoard.tsx b/src/app/components/upload-board/UploadBoard.tsx
index 42f3899f2..03690782f 100644
--- a/src/app/components/upload-board/UploadBoard.tsx
+++ b/src/app/components/upload-board/UploadBoard.tsx
@@ -59,14 +59,14 @@ export function UploadBoardHeader({
}
return acc;
},
- { loaded: 0, total: 0 }
+ { loaded: 0, total: 0 },
);
const handleSend = async () => {
if (sendingRef.current) return;
sendingRef.current = true;
await onSend(
- uploads.filter((upload) => upload.status === UploadStatus.Success) as UploadSuccess[]
+ uploads.filter((upload) => upload.status === UploadStatus.Success) as UploadSuccess[],
);
sendingRef.current = false;
};
diff --git a/src/app/components/upload-card/UploadCard.tsx b/src/app/components/upload-card/UploadCard.tsx
index 1e2edb96f..65ad7ab5e 100644
--- a/src/app/components/upload-card/UploadCard.tsx
+++ b/src/app/components/upload-card/UploadCard.tsx
@@ -28,7 +28,7 @@ export const UploadCard = forwardRef
{bottom}
- )
+ ),
);
type UploadCardProgressProps = {
diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx
index e6edde4cf..ca8b1236b 100644
--- a/src/app/components/url-preview/UrlPreviewCard.tsx
+++ b/src/app/components/url-preview/UrlPreviewCard.tsx
@@ -24,7 +24,7 @@ export const UrlPreviewCard = as<'div', { url: string; ts: number }>(
const useAuthentication = useMediaAuthentication();
const [viewer, setViewer] = useState(false);
const [previewStatus, loadPreview] = useAsyncCallback(
- useCallback(() => mx.getUrlPreview(url, ts), [url, ts, mx])
+ useCallback(() => mx.getUrlPreview(url, ts), [url, ts, mx]),
);
useEffect(() => {
@@ -41,7 +41,7 @@ export const UrlPreviewCard = as<'div', { url: string; ts: number }>(
256,
256,
'scale',
- false
+ false,
);
const imgUrl = mxcUrlToHttp(mx, prev['og:image'] || '', useAuthentication);
@@ -105,7 +105,7 @@ export const UrlPreviewCard = as<'div', { url: string; ts: number }>(
)}
);
- }
+ },
);
export const UrlPreviewHolder = as<'div'>(({ children, ...props }, ref) => {
@@ -133,8 +133,8 @@ export const UrlPreviewHolder = as<'div'>(({ children, ...props }, ref) => {
root: scrollRef.current,
rootMargin: '10px',
}),
- []
- )
+ [],
+ ),
);
useEffect(() => {
diff --git a/src/app/components/user-profile/CreatorChip.tsx b/src/app/components/user-profile/CreatorChip.tsx
index f59d2ae5b..9e707bd25 100644
--- a/src/app/components/user-profile/CreatorChip.tsx
+++ b/src/app/components/user-profile/CreatorChip.tsx
@@ -62,7 +62,7 @@ export function CreatorChip() {
openSpaceSettings(
room.roomId,
space?.roomId,
- SpaceSettingsPage.PermissionsPage
+ SpaceSettingsPage.PermissionsPage,
);
} else {
openRoomSettings(room.roomId, space?.roomId, RoomSettingsPage.PermissionsPage);
diff --git a/src/app/components/user-profile/PowerChip.tsx b/src/app/components/user-profile/PowerChip.tsx
index f46149652..956d3ead5 100644
--- a/src/app/components/user-profile/PowerChip.tsx
+++ b/src/app/components/user-profile/PowerChip.tsx
@@ -187,8 +187,8 @@ export function PowerChip({ userId }: { userId: string }) {
async (power: number) => {
await mx.setPowerLevel(room.roomId, userId, power);
},
- [mx, userId, room]
- )
+ [mx, userId, room],
+ ),
);
const changing = powerState.status === AsyncStatus.Loading;
const error = powerState.status === AsyncStatus.Error;
@@ -301,13 +301,13 @@ export function PowerChip({ userId }: { userId: string }) {
openSpaceSettings(
room.roomId,
space?.roomId,
- SpaceSettingsPage.PermissionsPage
+ SpaceSettingsPage.PermissionsPage,
);
} else {
openRoomSettings(
room.roomId,
space?.roomId,
- RoomSettingsPage.PermissionsPage
+ RoomSettingsPage.PermissionsPage,
);
}
close();
diff --git a/src/app/components/user-profile/UserChips.tsx b/src/app/components/user-profile/UserChips.tsx
index 19726fd36..53818b433 100644
--- a/src/app/components/user-profile/UserChips.tsx
+++ b/src/app/components/user-profile/UserChips.tsx
@@ -459,7 +459,7 @@ export function OptionsChip({ userId }: { userId: string }) {
const users = ignoredUsers.filter((u) => u !== userId);
if (!ignored) users.push(userId);
await mx.setIgnoredUsers(users);
- }, [mx, ignoredUsers, userId, ignored])
+ }, [mx, ignoredUsers, userId, ignored]),
);
const ignoring = ignoreState.status === AsyncStatus.Loading;
diff --git a/src/app/components/user-profile/UserModeration.tsx b/src/app/components/user-profile/UserModeration.tsx
index 814bb5ba1..12eacb879 100644
--- a/src/app/components/user-profile/UserModeration.tsx
+++ b/src/app/components/user-profile/UserModeration.tsx
@@ -75,7 +75,7 @@ export function UserBanAlert({ userId, reason, canUnban, bannedBy, ts }: UserBan
const [unbanState, unban] = useAsyncCallback(
useCallback(async () => {
await mx.unban(room.roomId, userId);
- }, [mx, room, userId])
+ }, [mx, room, userId]),
);
const banning = unbanState.status === AsyncStatus.Loading;
const error = unbanState.status === AsyncStatus.Error;
@@ -150,7 +150,7 @@ export function UserInviteAlert({ userId, reason, canKick, invitedBy, ts }: User
const [kickState, kick] = useAsyncCallback(
useCallback(async () => {
await mx.kick(room.roomId, userId);
- }, [mx, room, userId])
+ }, [mx, room, userId]),
);
const kicking = kickState.status === AsyncStatus.Loading;
const error = kickState.status === AsyncStatus.Error;
@@ -230,19 +230,19 @@ export function UserModeration({ userId, canKick, canBan, canInvite }: UserModer
const [kickState, kick] = useAsyncCallback(
useCallback(async () => {
await mx.kick(room.roomId, userId, getReason());
- }, [mx, room, userId, getReason])
+ }, [mx, room, userId, getReason]),
);
const [banState, ban] = useAsyncCallback(
useCallback(async () => {
await mx.ban(room.roomId, userId, getReason());
- }, [mx, room, userId, getReason])
+ }, [mx, room, userId, getReason]),
);
const [inviteState, invite] = useAsyncCallback(
useCallback(async () => {
await mx.invite(room.roomId, userId, getReason());
- }, [mx, room, userId, getReason])
+ }, [mx, room, userId, getReason]),
);
const disabled =
diff --git a/src/app/components/virtualizer/VirtualTile.tsx b/src/app/components/virtualizer/VirtualTile.tsx
index 0c6a5bd3c..53c86f3ea 100644
--- a/src/app/components/virtualizer/VirtualTile.tsx
+++ b/src/app/components/virtualizer/VirtualTile.tsx
@@ -16,5 +16,5 @@ export const VirtualTile = as<'div', VirtualTileProps>(
{...props}
ref={ref}
/>
- )
+ ),
);
diff --git a/src/app/cs-api.ts b/src/app/cs-api.ts
index 95a131a85..8445a3f07 100644
--- a/src/app/cs-api.ts
+++ b/src/app/cs-api.ts
@@ -28,13 +28,13 @@ export type AutoDiscoveryInfo = Record & {
{
livekit_service_url: string;
type: 'livekit';
- }
+ },
];
};
export const autoDiscovery = async (
request: typeof fetch,
- server: string
+ server: string,
): Promise<[AutoDiscoveryError, undefined] | [undefined, AutoDiscoveryInfo]> => {
const host = /^https?:\/\//.test(server) ? trimTrailingSlash(server) : `https://${server}`;
const autoDiscoveryUrl = `${host}/.well-known/matrix/client`;
@@ -99,7 +99,7 @@ export const autoDiscovery = async (
content['m.homeserver'].base_url = trimTrailingSlash(baseUrl);
if (content['m.identity_server']) {
content['m.identity_server'].base_url = trimTrailingSlash(
- content['m.identity_server'].base_url
+ content['m.identity_server'].base_url,
);
}
@@ -112,7 +112,7 @@ export type SpecVersions = {
};
export const specVersions = async (
request: typeof fetch,
- baseUrl: string
+ baseUrl: string,
): Promise => {
const res = await request(`${trimTrailingSlash(baseUrl)}/_matrix/client/versions`);
diff --git a/src/app/features/add-existing/AddExisting.tsx b/src/app/features/add-existing/AddExisting.tsx
index caadfad5c..ec293d6ca 100644
--- a/src/app/features/add-existing/AddExisting.tsx
+++ b/src/app/features/add-existing/AddExisting.tsx
@@ -97,13 +97,13 @@ export function AddExistingModal({ parentId, space, requestClose }: AddExistingM
const getRoomNameStr: SearchItemStrGetter = useCallback(
(rId) => getRoom(rId)?.name ?? rId,
- [getRoom]
+ [getRoom],
);
const [searchResult, searchRoom, resetSearch] = useAsyncSearch(
allItems,
getRoomNameStr,
- SEARCH_OPTS
+ SEARCH_OPTS,
);
const queryHighlighRegex = searchResult?.query
? makeHighlightRegex(searchResult.query.split(' '))
@@ -142,12 +142,12 @@ export function AddExistingModal({ parentId, space, requestClose }: AddExistingM
suggested: false,
via,
},
- room.roomId
+ room.roomId,
);
});
},
- [mx, parentId]
- )
+ [mx, parentId],
+ ),
);
const applyingChanges = applyState.status === AsyncStatus.Loading;
diff --git a/src/app/features/call-status/CallControl.tsx b/src/app/features/call-status/CallControl.tsx
index 35440cbb5..b8d037542 100644
--- a/src/app/features/call-status/CallControl.tsx
+++ b/src/app/features/call-status/CallControl.tsx
@@ -163,7 +163,7 @@ export function CallControl({
const { microphone, video, sound, screenshare } = useCallControlState(callEmbed.control);
const setCallEmbed = useSetAtom(callEmbedAtom);
const [hangupState, hangup] = useAsyncCallback(
- useCallback(() => callEmbed.hangup(), [callEmbed])
+ useCallback(() => callEmbed.hangup(), [callEmbed]),
);
const exiting =
hangupState.status === AsyncStatus.Loading || hangupState.status === AsyncStatus.Success;
diff --git a/src/app/features/call-status/LiveChip.tsx b/src/app/features/call-status/LiveChip.tsx
index a5d00a553..483d20ce5 100644
--- a/src/app/features/call-status/LiveChip.tsx
+++ b/src/app/features/call-status/LiveChip.tsx
@@ -77,7 +77,7 @@ export function LiveChip({ count, room, members }: LiveChipProps) {
getMemberDisplayName(room, userId) ?? getMxIdLocalPart(userId) ?? userId;
const avatarMxc = getMemberAvatarMxc(room, userId);
const avatarUrl = avatarMxc
- ? mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96) ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96) ?? undefined)
: undefined;
return (
@@ -93,7 +93,7 @@ export function LiveChip({ count, room, members }: LiveChipProps) {
undefined,
userId,
getMouseEventCords(evt.nativeEvent),
- 'Right'
+ 'Right',
)
}
before={
diff --git a/src/app/features/call-status/MemberGlance.tsx b/src/app/features/call-status/MemberGlance.tsx
index 2e65069aa..11862fb4d 100644
--- a/src/app/features/call-status/MemberGlance.tsx
+++ b/src/app/features/call-status/MemberGlance.tsx
@@ -34,7 +34,7 @@ export function MemberGlance({ room, members, speakers, max = 6 }: MemberGlanceP
const name = getMemberDisplayName(room, userId) ?? getMxIdLocalPart(userId) ?? userId;
const avatarMxc = getMemberAvatarMxc(room, userId);
const avatarUrl = avatarMxc
- ? mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96) ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96) ?? undefined)
: undefined;
return (
@@ -52,7 +52,7 @@ export function MemberGlance({ room, members, speakers, max = 6 }: MemberGlanceP
undefined,
userId,
getMouseEventCords(evt.nativeEvent),
- 'Top'
+ 'Top',
)
}
>
diff --git a/src/app/features/call-status/MemberSpeaking.tsx b/src/app/features/call-status/MemberSpeaking.tsx
index 27e272f21..c968f9114 100644
--- a/src/app/features/call-status/MemberSpeaking.tsx
+++ b/src/app/features/call-status/MemberSpeaking.tsx
@@ -10,7 +10,7 @@ type MemberSpeakingProps = {
};
export function MemberSpeaking({ room, speakers }: MemberSpeakingProps) {
const speakingNames = Array.from(speakers).map(
- (userId) => getMemberDisplayName(room, userId) ?? getMxIdLocalPart(userId) ?? userId
+ (userId) => getMemberDisplayName(room, userId) ?? getMxIdLocalPart(userId) ?? userId,
);
return (
diff --git a/src/app/features/call/CallControls.tsx b/src/app/features/call/CallControls.tsx
index a96042e29..296cb7281 100644
--- a/src/app/features/call/CallControls.tsx
+++ b/src/app/features/call/CallControls.tsx
@@ -46,11 +46,11 @@ export function CallControls({ callEmbed }: CallControlsProps) {
if (!element) return;
setCompact(element.clientWidth < 500);
}, []),
- useCallback(() => controlRef.current, [])
+ useCallback(() => controlRef.current, []),
);
const { microphone, video, sound, screenshare, spotlight } = useCallControlState(
- callEmbed.control
+ callEmbed.control,
);
const [cords, setCords] = useState();
@@ -172,7 +172,7 @@ export function CallControls({ callEmbed }: CallControlsProps) {
}, [pttMode, pttKey, callEmbed]);
const [hangupState, hangup] = useAsyncCallback(
- useCallback(() => callEmbed.hangup(), [callEmbed])
+ useCallback(() => callEmbed.hangup(), [callEmbed]),
);
const exiting =
hangupState.status === AsyncStatus.Loading || hangupState.status === AsyncStatus.Success;
diff --git a/src/app/features/call/CallMemberCard.tsx b/src/app/features/call/CallMemberCard.tsx
index f96b9a060..09aa6b4cd 100644
--- a/src/app/features/call/CallMemberCard.tsx
+++ b/src/app/features/call/CallMemberCard.tsx
@@ -34,7 +34,7 @@ export function CallMemberCard({ member }: CallMemberCardProps) {
const name = getMemberDisplayName(room, userId) ?? getMxIdLocalPart(userId) ?? userId;
const avatarMxc = getMemberAvatarMxc(room, userId);
const avatarUrl = avatarMxc
- ? mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96) ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96) ?? undefined)
: undefined;
const audioOnly =
@@ -53,7 +53,7 @@ export function CallMemberCard({ member }: CallMemberCardProps) {
undefined,
userId,
getMouseEventCords(evt.nativeEvent),
- 'Right'
+ 'Right',
)
}
>
diff --git a/src/app/features/call/CallView.tsx b/src/app/features/call/CallView.tsx
index 92cb4f90a..472c902ac 100644
--- a/src/app/features/call/CallView.tsx
+++ b/src/app/features/call/CallView.tsx
@@ -86,7 +86,7 @@ function CallPrescreen() {
const permissions = useRoomPermissions(creators, powerLevels);
const hasPermission = permissions.stateEvent(
StateEvent.GroupCallMemberPrefix,
- mx.getSafeUserId()
+ mx.getSafeUserId(),
);
const callSession = useCallSession(room);
diff --git a/src/app/features/common-settings/developer-tools/DevelopTools.tsx b/src/app/features/common-settings/developer-tools/DevelopTools.tsx
index b179d160c..13e1a34f4 100644
--- a/src/app/features/common-settings/developer-tools/DevelopTools.tsx
+++ b/src/app/features/common-settings/developer-tools/DevelopTools.tsx
@@ -60,7 +60,7 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
async (type, content) => {
await mx.setRoomAccountData(room.roomId, type, content);
},
- [mx, room.roomId]
+ [mx, room.roomId],
);
if (accountDataType !== undefined) {
diff --git a/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx b/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx
index 4b28c95d9..5d8221103 100644
--- a/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx
+++ b/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx
@@ -40,7 +40,7 @@ export function SendRoomEvent({ type, stateKey, requestClose }: SendRoomEventPro
const [jsonError, setJSONError] = useState();
const { handleKeyDown, operations, getTarget } = useTextAreaCodeEditor(
textAreaRef,
- EDITOR_INTENT_SPACE_COUNT
+ EDITOR_INTENT_SPACE_COUNT,
);
const [submitState, submit] = useAsyncCallback<
@@ -55,8 +55,8 @@ export function SendRoomEvent({ type, stateKey, requestClose }: SendRoomEventPro
}
return mx.sendEvent(room.roomId, evtType as any, evtContent);
},
- [mx, room]
- )
+ [mx, room],
+ ),
);
const submitting = submitState.status === AsyncStatus.Loading;
diff --git a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx
index eaec74f37..3aba5da02 100644
--- a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx
+++ b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx
@@ -47,21 +47,21 @@ function StateEventEdit({ type, stateKey, content, requestClose }: StateEventEdi
const defaultContentStr = useMemo(
() => JSON.stringify(content, undefined, EDITOR_INTENT_SPACE_COUNT),
- [content]
+ [content],
);
const textAreaRef = useRef(null);
const [jsonError, setJSONError] = useState();
const { handleKeyDown, operations, getTarget } = useTextAreaCodeEditor(
textAreaRef,
- EDITOR_INTENT_SPACE_COUNT
+ EDITOR_INTENT_SPACE_COUNT,
);
const [submitState, submit] = useAsyncCallback
);
- }
+ },
);
type LobbyHeaderProps = {
@@ -150,7 +150,7 @@ export function LobbyHeader({ showProfile, powerLevels }: LobbyHeaderProps) {
const name = useRoomName(space);
const avatarMxc = useRoomAvatar(space);
const avatarUrl = avatarMxc
- ? mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
const handleOpenMenu: MouseEventHandler = (evt) => {
diff --git a/src/app/features/lobby/LobbyHero.tsx b/src/app/features/lobby/LobbyHero.tsx
index 22774476e..6effcd8c1 100644
--- a/src/app/features/lobby/LobbyHero.tsx
+++ b/src/app/features/lobby/LobbyHero.tsx
@@ -23,7 +23,7 @@ export function LobbyHero() {
const topic = useRoomTopic(space);
const avatarMxc = useRoomAvatar(space);
const avatarUrl = avatarMxc
- ? mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
return (
diff --git a/src/app/features/lobby/RoomItem.tsx b/src/app/features/lobby/RoomItem.tsx
index 7de59acd9..215de2660 100644
--- a/src/app/features/lobby/RoomItem.tsx
+++ b/src/app/features/lobby/RoomItem.tsx
@@ -47,7 +47,7 @@ function RoomJoinButton({ roomId, via }: RoomJoinButtonProps) {
const mx = useMatrixClient();
const [joinState, join] = useAsyncCallback(
- useCallback(() => mx.joinRoom(roomId, { viaServers: via }), [mx, roomId, via])
+ useCallback(() => mx.joinRoom(roomId, { viaServers: via }), [mx, roomId, via]),
);
const canJoin = joinState.status === AsyncStatus.Idle || joinState.status === AsyncStatus.Error;
@@ -309,7 +309,7 @@ export const RoomItemCard = as<'div', RoomItemCardProps>(
getRoom,
...props
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
@@ -402,8 +402,8 @@ export const RoomItemCard = as<'div', RoomItemCardProps>(
topic={summary.topic}
avatarUrl={
summary?.avatar_url
- ? mxcUrlToHttp(mx, summary.avatar_url, useAuthentication, 96, 96, 'crop') ??
- undefined
+ ? (mxcUrlToHttp(mx, summary.avatar_url, useAuthentication, 96, 96, 'crop') ??
+ undefined)
: undefined
}
memberCount={summary.num_joined_members}
@@ -419,5 +419,5 @@ export const RoomItemCard = as<'div', RoomItemCardProps>(
{after}
);
- }
+ },
);
diff --git a/src/app/features/lobby/SpaceHierarchy.tsx b/src/app/features/lobby/SpaceHierarchy.tsx
index 280b8a5a2..f06c741eb 100644
--- a/src/app/features/lobby/SpaceHierarchy.tsx
+++ b/src/app/features/lobby/SpaceHierarchy.tsx
@@ -63,7 +63,7 @@ export const SpaceHierarchy = forwardRef(
onOpenRoom,
onSpacesFound,
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
@@ -228,5 +228,5 @@ export const SpaceHierarchy = forwardRef(
)}
);
- }
+ },
);
diff --git a/src/app/features/lobby/SpaceItem.tsx b/src/app/features/lobby/SpaceItem.tsx
index ed3eaff9a..5dddca935 100644
--- a/src/app/features/lobby/SpaceItem.tsx
+++ b/src/app/features/lobby/SpaceItem.tsx
@@ -113,7 +113,7 @@ function UnjoinedSpaceProfile({
const mx = useMatrixClient();
const [joinState, join] = useAsyncCallback(
- useCallback(() => mx.joinRoom(roomId, { viaServers: via }), [mx, roomId, via])
+ useCallback(() => mx.joinRoom(roomId, { viaServers: via }), [mx, roomId, via]),
);
const canJoin = joinState.status === AsyncStatus.Idle || joinState.status === AsyncStatus.Error;
@@ -423,7 +423,7 @@ export const SpaceItemCard = as<'div', SpaceItemCardProps>(
getRoom,
...props
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
@@ -484,8 +484,14 @@ export const SpaceItemCard = as<'div', SpaceItemCardProps>(
name={summary.name || summary.canonical_alias || roomId}
avatarUrl={
summary?.avatar_url
- ? mxcUrlToHttp(mx, summary.avatar_url, useAuthentication, 96, 96, 'crop') ??
- undefined
+ ? (mxcUrlToHttp(
+ mx,
+ summary.avatar_url,
+ useAuthentication,
+ 96,
+ 96,
+ 'crop',
+ ) ?? undefined)
: undefined
}
suggested={content.suggested}
@@ -505,5 +511,5 @@ export const SpaceItemCard = as<'div', SpaceItemCardProps>(
{after}
);
- }
+ },
);
diff --git a/src/app/features/message-search/MessageSearch.tsx b/src/app/features/message-search/MessageSearch.tsx
index 26085b5f0..e1db6e099 100644
--- a/src/app/features/message-search/MessageSearch.tsx
+++ b/src/app/features/message-search/MessageSearch.tsx
@@ -33,7 +33,7 @@ const useSearchPathSearchParams = (searchParams: URLSearchParams): _SearchPathSe
rooms: searchParams.get('rooms') ?? undefined,
senders: searchParams.get('senders') ?? undefined,
}),
- [searchParams]
+ [searchParams],
);
type MessageSearchProps = {
@@ -69,7 +69,7 @@ export function MessageSearch({
const searchParamRooms = useMemo(() => {
if (searchPathSearchParams.rooms) {
const joinedRoomIds = decodeSearchParamValueArray(searchPathSearchParams.rooms).filter(
- (rId) => allRooms.includes(rId)
+ (rId) => allRooms.includes(rId),
);
return joinedRoomIds;
}
diff --git a/src/app/features/message-search/SearchFilters.tsx b/src/app/features/message-search/SearchFilters.tsx
index 6883e3631..0762bcc38 100644
--- a/src/app/features/message-search/SearchFilters.tsx
+++ b/src/app/features/message-search/SearchFilters.tsx
@@ -134,13 +134,13 @@ function SelectRoomButton({ roomList, selectedRooms, onChange }: SelectRoomButto
const getRoomNameStr: SearchItemStrGetter = useCallback(
(rId) => mx.getRoom(rId)?.name ?? rId,
- [mx]
+ [mx],
);
const [searchResult, _searchRoom, resetSearch] = useAsyncSearch(
roomList,
getRoomNameStr,
- SEARCH_OPTS
+ SEARCH_OPTS,
);
const rooms = Array.from(searchResult?.items ?? roomList).sort(factoryRoomIdByAtoZ(mx));
diff --git a/src/app/features/message-search/SearchResultGroup.tsx b/src/app/features/message-search/SearchResultGroup.tsx
index 14817cc46..44b6b39bb 100644
--- a/src/app/features/message-search/SearchResultGroup.tsx
+++ b/src/app/features/message-search/SearchResultGroup.tsx
@@ -95,10 +95,10 @@ export function SearchResultGroup({
() => ({
...LINKIFY_OPTS,
render: factoryRenderLinkifyWithMention((href) =>
- renderMatrixMention(mx, room.roomId, href, makeMentionCustomProps(mentionClickHandler))
+ renderMatrixMention(mx, room.roomId, href, makeMentionCustomProps(mentionClickHandler)),
),
}),
- [mx, room, mentionClickHandler]
+ [mx, room, mentionClickHandler],
);
const htmlReactParserOptions = useMemo(
() =>
@@ -117,7 +117,7 @@ export function SearchResultGroup({
mentionClickHandler,
spoilerClickHandler,
useAuthentication,
- ]
+ ],
);
const renderMatrixEvent = useMatrixEventRenderer<[IEventWithRoomId, string, GetContentCallback]>(
@@ -184,7 +184,7 @@ export function SearchResultGroup({
);
- }
+ },
);
const handleOpenClick: MouseEventHandler = (evt) => {
@@ -263,14 +263,14 @@ export function SearchResultGroup({
userId={event.sender}
src={
senderAvatarMxc
- ? mxcUrlToHttp(
+ ? (mxcUrlToHttp(
mx,
senderAvatarMxc,
useAuthentication,
48,
48,
- 'crop'
- ) ?? undefined
+ 'crop',
+ ) ?? undefined)
: undefined
}
alt={displayName}
diff --git a/src/app/features/message-search/useMessageSearch.ts b/src/app/features/message-search/useMessageSearch.ts
index ded6d4b74..5eb79da89 100644
--- a/src/app/features/message-search/useMessageSearch.ts
+++ b/src/app/features/message-search/useMessageSearch.ts
@@ -108,7 +108,7 @@ export const useMessageSearch = (params: MessageSearchParams) => {
});
return parseSearchResult(r);
},
- [mx, term, order, rooms, senders]
+ [mx, term, order, rooms, senders],
);
return searchMessages;
diff --git a/src/app/features/room-nav/RoomNavCategoryButton.tsx b/src/app/features/room-nav/RoomNavCategoryButton.tsx
index 3af8aeac8..b40d8826d 100644
--- a/src/app/features/room-nav/RoomNavCategoryButton.tsx
+++ b/src/app/features/room-nav/RoomNavCategoryButton.tsx
@@ -23,5 +23,5 @@ export const RoomNavCategoryButton = as<'button', { closed?: boolean }>(
{children}
- )
+ ),
);
diff --git a/src/app/features/room-nav/RoomNavItem.tsx b/src/app/features/room-nav/RoomNavItem.tsx
index 126cfb9d6..018d336ea 100644
--- a/src/app/features/room-nav/RoomNavItem.tsx
+++ b/src/app/features/room-nav/RoomNavItem.tsx
@@ -216,7 +216,7 @@ const RoomNavItemMenu = forwardRef(
);
- }
+ },
);
function CallChatToggle() {
@@ -261,7 +261,7 @@ function RoomNavItem_({
const [menuAnchor, setMenuAnchor] = useState();
const unread = useRoomUnread(room.roomId, roomToUnreadAtom);
const typingMember = useRoomTypingMember(room.roomId).filter(
- (receipt) => receipt.userId !== mx.getUserId()
+ (receipt) => receipt.userId !== mx.getUserId(),
);
const roomName = useRoomName(room);
@@ -296,7 +296,7 @@ function RoomNavItem_({
const hasCallPermission = permissions.stateEvent(
StateEvent.GroupCallMemberPrefix,
- mx.getSafeUserId()
+ mx.getSafeUserId(),
);
// Do not join if missing permissions or no livekit support or no webRTC support
diff --git a/src/app/features/room-settings/RoomSettings.tsx b/src/app/features/room-settings/RoomSettings.tsx
index 53ea0fa88..7a0b452f7 100644
--- a/src/app/features/room-settings/RoomSettings.tsx
+++ b/src/app/features/room-settings/RoomSettings.tsx
@@ -53,7 +53,7 @@ const useRoomSettingsMenuItems = (): RoomSettingsMenuItem[] =>
icon: Icons.Terminal,
},
],
- []
+ [],
);
type RoomSettingsProps = {
@@ -71,7 +71,7 @@ export function RoomSettings({ initialPage, requestClose }: RoomSettingsProps) {
const joinRuleContent = useRoomJoinRule(room);
const avatarUrl = roomAvatar
- ? mxcUrlToHttp(mx, roomAvatar, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, roomAvatar, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
const screenSize = useScreenSizeContext();
diff --git a/src/app/features/room/CommandAutocomplete.tsx b/src/app/features/room/CommandAutocomplete.tsx
index 6b7ba56ec..f19c211f4 100644
--- a/src/app/features/room/CommandAutocomplete.tsx
+++ b/src/app/features/room/CommandAutocomplete.tsx
@@ -43,7 +43,7 @@ export function CommandAutocomplete({
const [result, search, resetSearch] = useAsyncSearch(
commandNames,
useCallback((commandName: string) => commandName, []),
- SEARCH_OPTIONS
+ SEARCH_OPTIONS,
);
const autoCompleteNames = result ? result.items : commandNames;
diff --git a/src/app/features/room/MembersDrawer.tsx b/src/app/features/room/MembersDrawer.tsx
index 19727c019..91c6be61b 100644
--- a/src/app/features/room/MembersDrawer.tsx
+++ b/src/app/features/room/MembersDrawer.tsx
@@ -206,13 +206,13 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) {
const filteredMembers = useMemo(
() => members.filter(membershipFilter.filterFn).sort(memberSort.sortFn).sort(memberPowerSort),
- [members, membershipFilter, memberSort, memberPowerSort]
+ [members, membershipFilter, memberSort, memberPowerSort],
);
const [result, search, resetSearch] = useAsyncSearch(
filteredMembers,
getRoomMemberStr,
- SEARCH_OPTIONS
+ SEARCH_OPTIONS,
);
if (!result && searchInputRef.current?.value) search(searchInputRef.current.value);
@@ -233,9 +233,9 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) {
if (evt.target.value) search(evt.target.value);
else resetSearch();
},
- [search, resetSearch]
+ [search, resetSearch],
),
- { wait: 200 }
+ { wait: 200 },
);
const handleMemberClick: MouseEventHandler = (evt) => {
@@ -276,7 +276,7 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) {
onClick={
((evt) =>
setAnchor(
- evt.currentTarget.getBoundingClientRect()
+ evt.currentTarget.getBoundingClientRect(),
)) as MouseEventHandler
}
variant="Background"
@@ -308,7 +308,7 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) {
onClick={
((evt) =>
setAnchor(
- evt.currentTarget.getBoundingClientRect()
+ evt.currentTarget.getBoundingClientRect(),
)) as MouseEventHandler
}
variant="Background"
@@ -421,7 +421,7 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) {
onClick={handleMemberClick}
pressed={openProfileUserId === tagOrMember.userId}
typing={typingMembers.some(
- (receipt) => receipt.userId === tagOrMember.userId
+ (receipt) => receipt.userId === tagOrMember.userId,
)}
/>
diff --git a/src/app/features/room/Room.tsx b/src/app/features/room/Room.tsx
index d83e4b0a7..ef1634873 100644
--- a/src/app/features/room/Room.tsx
+++ b/src/app/features/room/Room.tsx
@@ -46,8 +46,8 @@ export function Room() {
markAsRead(mx, room.roomId, hideActivity);
}
},
- [mx, room.roomId, hideActivity]
- )
+ [mx, room.roomId, hideActivity],
+ ),
);
const callView = callEmbed?.roomId === room.roomId || room.isCallRoom() || callMembers.length > 0;
diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx
index aa867c5b7..396be55b4 100644
--- a/src/app/features/room/RoomInput.tsx
+++ b/src/app/features/room/RoomInput.tsx
@@ -31,7 +31,7 @@ import {
import { useMatrixClient } from '../../hooks/useMatrixClient';
const GifPicker = React.lazy(() =>
- import('../../components/GifPicker').then((m) => ({ default: m.GifPicker }))
+ import('../../components/GifPicker').then((m) => ({ default: m.GifPicker })),
);
import { useClientConfig } from '../../hooks/useClientConfig';
import {
@@ -60,7 +60,7 @@ import {
} from '../../components/editor';
import { EmojiBoardTab } from '../../components/emoji-board/types';
const EmojiBoard = React.lazy(() =>
- import('../../components/emoji-board').then((m) => ({ default: m.EmojiBoard }))
+ import('../../components/emoji-board').then((m) => ({ default: m.EmojiBoard })),
);
import { UseStateProvider } from '../../components/UseStateProvider';
import {
@@ -159,7 +159,7 @@ export const RoomInput = forwardRef(
const accessibleTagColors = useAccessiblePowerTagColors(
theme.kind,
creatorsTag,
- powerLevelTags
+ powerLevelTags,
);
const replyPowerTag = replyUserID ? getMemberPowerTag(replyUserID) : undefined;
@@ -173,7 +173,7 @@ export const RoomInput = forwardRef(
const [selectedFiles, setSelectedFiles] = useAtom(roomIdToUploadItemsAtomFamily(roomId));
const uploadFamilyObserverAtom = createUploadFamilyObserverAtom(
roomUploadAtomFamily,
- selectedFiles.map((f) => f.file)
+ selectedFiles.map((f) => f.file),
);
const uploadBoardHandlers = useRef();
@@ -196,7 +196,7 @@ export const RoomInput = forwardRef(
} as any);
},
() => setLocating(false),
- { timeout: 10000 }
+ { timeout: 10000 },
);
};
@@ -213,7 +213,7 @@ export const RoomInput = forwardRef(
if (room.hasEncryptionStateEvent()) {
const encryptFiles = fulfilledPromiseSettledResult(
- await Promise.allSettled(safeFiles.map((f) => encryptFile(f)))
+ await Promise.allSettled(safeFiles.map((f) => encryptFile(f))),
);
encryptFiles.forEach((ef) =>
fileItems.push({
@@ -221,7 +221,7 @@ export const RoomInput = forwardRef(
metadata: {
markedAsSpoiler: false,
},
- })
+ }),
);
} else {
safeFiles.forEach((f) =>
@@ -232,7 +232,7 @@ export const RoomInput = forwardRef(
metadata: {
markedAsSpoiler: false,
},
- })
+ }),
);
}
setSelectedFiles({
@@ -240,7 +240,7 @@ export const RoomInput = forwardRef(
item: fileItems,
});
},
- [setSelectedFiles, room]
+ [setSelectedFiles, room],
);
const pickFile = useFilePicker(handleFiles, true);
const handlePaste = useFilePasteHandler(handleFiles);
@@ -254,7 +254,7 @@ export const RoomInput = forwardRef(
useElementSizeObserver(
useCallback(() => fileDropContainerRef.current, [fileDropContainerRef]),
- useCallback((width) => setHideStickerBtn(width < 500), [])
+ useCallback((width) => setHideStickerBtn(width < 500), []),
);
const didRestoreDraft = React.useRef(false);
@@ -277,7 +277,7 @@ export const RoomInput = forwardRef(
resetEditor(editor);
resetEditorHistory(editor);
},
- [roomId, editor, setMsgDraft]
+ [roomId, editor, setMsgDraft],
);
const handleFileMetadata = useCallback(
@@ -288,7 +288,7 @@ export const RoomInput = forwardRef(
replacement: { ...fileItem, metadata },
});
},
- [setSelectedFiles]
+ [setSelectedFiles],
);
const handleRemoveUpload = useCallback(
@@ -300,7 +300,7 @@ export const RoomInput = forwardRef(
});
uploads.forEach((u) => roomUploadAtomFamily.remove(u));
},
- [setSelectedFiles, selectedFiles]
+ [setSelectedFiles, selectedFiles],
);
const handleCancelUpload = (uploads: Upload[]) => {
@@ -343,7 +343,7 @@ export const RoomInput = forwardRef(
allowTextFormatting: true,
allowBlockMarkdown: isMarkdown,
allowInlineMarkdown: isMarkdown,
- })
+ }),
);
let msgType = MsgType.Text;
@@ -434,7 +434,7 @@ export const RoomInput = forwardRef(
setReplyDraft(undefined);
}
},
- [submit, setReplyDraft, enterForNewline, autocompleteQuery, isComposing]
+ [submit, setReplyDraft, enterForNewline, autocompleteQuery, isComposing],
);
const handleKeyUp: KeyboardEventHandler = useCallback(
@@ -454,7 +454,7 @@ export const RoomInput = forwardRef(
: undefined;
setAutocompleteQuery(query);
},
- [editor, sendTypingStatus, hideActivity]
+ [editor, sendTypingStatus, hideActivity],
);
const handleCloseAutocomplete = useCallback(() => {
@@ -497,7 +497,7 @@ export const RoomInput = forwardRef(
const uploadRes = await mx.uploadContent(
new File([blob], 'image.gif', { type: 'image/gif' }),
- { type: 'image/gif', name: 'image.gif', includeFilename: false }
+ { type: 'image/gif', name: 'image.gif', includeFilename: false },
);
const mxcUrl = (uploadRes as { content_uri: string }).content_uri;
if (!mxcUrl) return;
@@ -514,7 +514,7 @@ export const RoomInput = forwardRef(
setTimeout(() => setGifError(null), 4000);
}
},
- [mx, roomId]
+ [mx, roomId],
);
const handleStickerSelect = async (mxc: string, shortcode: string, label: string) => {
@@ -523,7 +523,7 @@ export const RoomInput = forwardRef(
const info = await getImageInfo(
await loadImageElement(stickerUrl),
- await getImageUrlBlob(stickerUrl)
+ await getImageUrlBlob(stickerUrl),
);
mx.sendEvent(roomId, EventType.Sticker, {
@@ -703,7 +703,7 @@ export const RoomInput = forwardRef(
anchor={
emojiBoardTab === undefined
? undefined
- : emojiBtnRef.current?.getBoundingClientRect() ?? undefined
+ : (emojiBtnRef.current?.getBoundingClientRect() ?? undefined)
}
content={
@@ -774,7 +774,7 @@ export const RoomInput = forwardRef(
align="End"
anchor={
gifOpen
- ? gifBtnRef.current?.getBoundingClientRect() ?? undefined
+ ? (gifBtnRef.current?.getBoundingClientRect() ?? undefined)
: undefined
}
content={
@@ -871,5 +871,5 @@ export const RoomInput = forwardRef(
/>
);
- }
+ },
);
diff --git a/src/app/features/room/RoomInputPlaceholder.tsx b/src/app/features/room/RoomInputPlaceholder.tsx
index 77c7ccf36..45a6dc31f 100644
--- a/src/app/features/room/RoomInputPlaceholder.tsx
+++ b/src/app/features/room/RoomInputPlaceholder.tsx
@@ -7,5 +7,5 @@ import * as css from './RoomInputPlaceholder.css';
export const RoomInputPlaceholder = as<'div', ComponentProps>(
({ className, ...props }, ref) => (
- )
+ ),
);
diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx
index 84bc1ac06..0edee386e 100644
--- a/src/app/features/room/RoomTimeline.tsx
+++ b/src/app/features/room/RoomTimeline.tsx
@@ -141,7 +141,7 @@ const TimelineFloat = as<'div', css.TimelineFloatVariants>(
{...props}
ref={ref}
/>
- )
+ ),
);
const TimelineDivider = as<'div', { variant?: ContainerColor | 'Inherit' }>(
@@ -151,7 +151,7 @@ const TimelineDivider = as<'div', { variant?: ContainerColor | 'Inherit' }>(
{children}
- )
+ ),
);
export const getLiveTimeline = (room: Room): EventTimeline =>
@@ -164,7 +164,7 @@ export const getEventTimeline = (room: Room, eventId: string): EventTimeline | u
export const getFirstLinkedTimeline = (
timeline: EventTimeline,
- direction: Direction
+ direction: Direction,
): EventTimeline => {
const linkedTm = timeline.getNeighbouringTimeline(direction);
if (!linkedTm) return timeline;
@@ -194,7 +194,7 @@ export const getTimelinesEventsCount = (timelines: EventTimeline[]): number => {
export const getTimelineAndBaseIndex = (
timelines: EventTimeline[],
- index: number
+ index: number,
): [EventTimeline | undefined, number] => {
let uptoTimelineLen = 0;
const timeline = timelines.find((t) => {
@@ -215,7 +215,7 @@ export const getTimelineEvent = (timeline: EventTimeline, index: number): Matrix
export const getEventIdAbsoluteIndex = (
timelines: EventTimeline[],
eventTimeline: EventTimeline,
- eventId: string
+ eventId: string,
): number | undefined => {
const timelineIndex = timelines.findIndex((t) => t === eventTimeline);
if (timelineIndex === -1) return undefined;
@@ -245,12 +245,12 @@ const useEventTimelineLoader = (
mx: MatrixClient,
room: Room,
onLoad: (eventId: string, linkedTimelines: EventTimeline[], evtAbsIndex: number) => void,
- onError: (err: Error | null) => void
+ onError: (err: Error | null) => void,
) => {
const loadEventTimeline = useCallback(
async (eventId: string) => {
const [err, replyEvtTimeline] = await to(
- mx.getEventTimeline(room.getUnfilteredTimelineSet(), eventId)
+ mx.getEventTimeline(room.getUnfilteredTimelineSet(), eventId),
);
if (!replyEvtTimeline) {
onError(err ?? null);
@@ -266,7 +266,7 @@ const useEventTimelineLoader = (
onLoad(eventId, linkedTimelines, absIndex);
},
- [mx, room, onLoad, onError]
+ [mx, room, onLoad, onError],
);
return loadEventTimeline;
@@ -276,7 +276,7 @@ const useTimelinePagination = (
mx: MatrixClient,
timeline: Timeline,
setTimeline: Dispatch>,
- limit: number
+ limit: number,
) => {
const timelineRef = useRef(timeline);
timelineRef.current = timeline;
@@ -288,7 +288,7 @@ const useTimelinePagination = (
const recalibratePagination = (
linkedTimelines: EventTimeline[],
timelinesEventsCount: number[],
- backwards: boolean
+ backwards: boolean,
) => {
const topTimeline = linkedTimelines[0];
const timelineMatch = (mt: EventTimeline) => (t: EventTimeline) => t === mt;
@@ -322,7 +322,7 @@ const useTimelinePagination = (
if (!timelineToPaginate) return;
const paginationToken = timelineToPaginate.getPaginationToken(
- backwards ? Direction.Backward : Direction.Forward
+ backwards ? Direction.Backward : Direction.Forward,
);
if (
!paginationToken &&
@@ -338,7 +338,7 @@ const useTimelinePagination = (
mx.paginateEventTimeline(timelineToPaginate, {
backwards,
limit,
- })
+ }),
);
if (err) {
fetching = false;
@@ -346,7 +346,7 @@ const useTimelinePagination = (
}
const fetchedTimeline =
timelineToPaginate.getNeighbouringTimeline(
- backwards ? Direction.Backward : Direction.Forward
+ backwards ? Direction.Backward : Direction.Forward,
) ?? timelineToPaginate;
// Decrypt all event ahead of render cycle
const roomId = fetchedTimeline.getRoomId();
@@ -372,7 +372,7 @@ const useLiveEventArrive = (room: Room, onArrive: (mEvent: MatrixEvent) => void)
eventRoom,
toStartOfTimeline,
removed,
- data
+ data,
) => {
if (eventRoom?.roomId !== room.roomId || !data.liveEvent) return;
onArrive(mEvent);
@@ -472,7 +472,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
const accessiblePowerTagColors = useAccessiblePowerTagColors(
theme.kind,
creatorsTag,
- powerLevelTags
+ powerLevelTags,
);
const permissions = useRoomPermissions(creators, powerLevels);
@@ -524,10 +524,10 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
() => ({
...LINKIFY_OPTS,
render: factoryRenderLinkifyWithMention((href) =>
- renderMatrixMention(mx, room.roomId, href, makeMentionCustomProps(mentionClickHandler))
+ renderMatrixMention(mx, room.roomId, href, makeMentionCustomProps(mentionClickHandler)),
),
}),
- [mx, room, mentionClickHandler]
+ [mx, room, mentionClickHandler],
);
const htmlReactParserOptions = useMemo(
() =>
@@ -537,12 +537,12 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
handleSpoilerClick: spoilerClickHandler,
handleMentionClick: mentionClickHandler,
}),
- [mx, room, linkifyOpts, spoilerClickHandler, mentionClickHandler, useAuthentication]
+ [mx, room, linkifyOpts, spoilerClickHandler, mentionClickHandler, useAuthentication],
);
const parseMemberEvent = useMemberEventParser();
const [timeline, setTimeline] = useState(() =>
- eventId ? getEmptyTimeline() : getInitialTimeline(room)
+ eventId ? getEmptyTimeline() : getInitialTimeline(room),
);
const timelineRef = React.useRef(timeline);
timelineRef.current = timeline;
@@ -571,7 +571,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
mx,
timeline,
setTimeline,
- PAGINATION_LIMIT
+ PAGINATION_LIMIT,
);
const getScrollElement = useCallback(() => scrollRef.current, []);
@@ -587,7 +587,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
(index: number) =>
(scrollRef.current?.querySelector(`[data-message-item="${index}"]`) as HTMLElement) ??
undefined,
- []
+ [],
),
onEnd: handleTimelinePagination,
});
@@ -613,14 +613,14 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
},
});
},
- [alive]
+ [alive],
),
useCallback(() => {
if (!alive()) return;
setTimeline(getInitialTimeline(room));
scrollToBottomRef.current.count += 1;
scrollToBottomRef.current.smooth = false;
- }, [alive, room])
+ }, [alive, room]),
);
useLiveEventArrive(
@@ -661,15 +661,15 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
setUnreadInfo(getRoomUnreadInfo(room));
}
},
- [mx, room, unreadInfo, hideActivity]
- )
+ [mx, room, unreadInfo, hideActivity],
+ ),
);
const handleOpenEvent = useCallback(
async (
evtId: string,
highlight = true,
- onScroll: ((scrolled: boolean) => void) | undefined = undefined
+ onScroll: ((scrolled: boolean) => void) | undefined = undefined,
) => {
const evtTimeline = getEventTimeline(room, evtId);
const absoluteIndex =
@@ -693,7 +693,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
loadEventTimeline(evtId);
}
},
- [room, scrollToItem, loadEventTimeline]
+ [room, scrollToItem, loadEventTimeline],
);
useLiveTimelineRefresh(
@@ -702,7 +702,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
if (liveTimelineLinked) {
setTimeline(getInitialTimeline(room));
}
- }, [room, liveTimelineLinked])
+ }, [room, liveTimelineLinked]),
);
// Stay at bottom when room editor resize
@@ -725,7 +725,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
}
};
}, [getScrollElement, roomInputRef]),
- useCallback(() => roomInputRef.current, [roomInputRef])
+ useCallback(() => roomInputRef.current, [roomInputRef]),
);
const tryAutoMarkAsRead = useCallback(() => {
@@ -745,7 +745,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
useCallback((entry: IntersectionObserverEntry) => {
if (!entry.isIntersecting) setAtBottom(false);
}, []),
- { wait: 1000 }
+ { wait: 1000 },
);
useIntersectionObserver(
useCallback(
@@ -761,16 +761,16 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
}
}
},
- [debounceSetAtBottom, tryAutoMarkAsRead]
+ [debounceSetAtBottom, tryAutoMarkAsRead],
),
useCallback(
() => ({
root: getScrollElement(),
rootMargin: '100px',
}),
- [getScrollElement]
+ [getScrollElement],
),
- useCallback(() => atBottomAnchorRef.current, [])
+ useCallback(() => atBottomAnchorRef.current, []),
);
useDocumentFocusChange(
@@ -790,8 +790,8 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
tryAutoMarkAsRead();
}
},
- [tryAutoMarkAsRead, unreadInfo, handleOpenEvent]
- )
+ [tryAutoMarkAsRead, unreadInfo, handleOpenEvent],
+ ),
);
// Handle up arrow edit
@@ -806,7 +806,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
isEmptyEditor(editor)
) {
const editableEvt = getLatestEditableEvt(room.getLiveTimeline(), (mEvt) =>
- canEditEvent(mx, mEvt)
+ canEditEvent(mx, mEvt),
);
const editableEvtId = editableEvt?.getId();
if (!editableEvtId) return;
@@ -814,8 +814,8 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
evt.preventDefault();
}
},
- [mx, room, editor]
- )
+ [mx, room, editor],
+ ),
);
useEffect(() => {
@@ -931,7 +931,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
if (!targetId) return;
handleOpenEvent(targetId);
},
- [handleOpenEvent]
+ [handleOpenEvent],
);
const handleUserClick: MouseEventHandler = useCallback(
@@ -947,10 +947,10 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
room.roomId,
space?.roomId,
userId,
- evt.currentTarget.getBoundingClientRect()
+ evt.currentTarget.getBoundingClientRect(),
);
},
- [room, space, openUserRoomProfile]
+ [room, space, openUserRoomProfile],
);
const handleUsernameClick: MouseEventHandler = useCallback(
(evt) => {
@@ -965,13 +965,13 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
createMentionElement(
userId,
name.startsWith('@') ? name : `@${name}`,
- userId === mx.getUserId()
- )
+ userId === mx.getUserId(),
+ ),
);
ReactEditor.focus(editor);
moveCursor(editor);
},
- [mx, room, editor]
+ [mx, room, editor],
);
const handleReplyClick: MouseEventHandler = useCallback(
@@ -1001,7 +1001,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
setTimeout(() => ReactEditor.focus(editor), 100);
}
},
- [room, setReplyDraft, editor]
+ [room, setReplyDraft, editor],
);
const handleReactionToggle = useCallback(
@@ -1022,10 +1022,10 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
mx.sendEvent(
room.roomId,
MessageEvent.Reaction as any,
- getReactionContent(targetEventId, key, rShortcode)
+ getReactionContent(targetEventId, key, rShortcode),
);
},
- [mx, room]
+ [mx, room],
);
const handleEdit = useCallback(
(editEvtId?: string) => {
@@ -1036,7 +1036,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
setEditId(undefined);
ReactEditor.focus(editor);
},
- [editor]
+ [editor],
);
const { t } = useTranslation();
@@ -1938,7 +1938,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
/>
);
- }
+ },
);
let prevEvent: MatrixEvent | undefined;
@@ -2014,7 +2014,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
mEvent,
item,
timelineSet,
- collapsed
+ collapsed,
);
prevEvent = mEvent;
isPrevRendered = !!eventJSX;
diff --git a/src/app/features/room/RoomTombstone.tsx b/src/app/features/room/RoomTombstone.tsx
index 24f0b80e2..947735638 100644
--- a/src/app/features/room/RoomTombstone.tsx
+++ b/src/app/features/room/RoomTombstone.tsx
@@ -21,7 +21,7 @@ export function RoomTombstone({ roomId, body, replacementRoomId }: RoomTombstone
return mx.joinRoom(replacementRoomId, {
viaServers: via,
});
- }, [mx, roomId, replacementRoomId])
+ }, [mx, roomId, replacementRoomId]),
);
const replacementRoom = mx.getRoom(replacementRoomId);
diff --git a/src/app/features/room/RoomView.tsx b/src/app/features/room/RoomView.tsx
index 5f2ee02ad..de69b1604 100644
--- a/src/app/features/room/RoomView.tsx
+++ b/src/app/features/room/RoomView.tsx
@@ -92,14 +92,14 @@ export function RoomView({ eventId }: { eventId?: string }) {
ReactEditor.focus(editor);
}
},
- [editor]
- )
+ [editor],
+ ),
);
const chatBgStyle = useMemo(
() =>
getChatBg(lotusTerminal && chatBackground === 'none' ? 'tactical' : chatBackground, isDark),
- [chatBackground, lotusTerminal, isDark]
+ [chatBackground, lotusTerminal, isDark],
);
return (
diff --git a/src/app/features/room/RoomViewFollowing.tsx b/src/app/features/room/RoomViewFollowing.tsx
index 5a96e6ad4..5265c35b9 100644
--- a/src/app/features/room/RoomViewFollowing.tsx
+++ b/src/app/features/room/RoomViewFollowing.tsx
@@ -40,7 +40,8 @@ export const RoomViewFollowing = as<'div', RoomViewFollowingProps>(
const names = latestEventReaders
.filter((readerId) => readerId !== mx.getUserId())
.map(
- (readerId) => getMemberDisplayName(room, readerId) ?? getMxIdLocalPart(readerId) ?? readerId
+ (readerId) =>
+ getMemberDisplayName(room, readerId) ?? getMxIdLocalPart(readerId) ?? readerId,
);
const eventId = latestEvent?.getId();
@@ -141,5 +142,5 @@ export const RoomViewFollowing = as<'div', RoomViewFollowingProps>(
>
);
- }
+ },
);
diff --git a/src/app/features/room/RoomViewHeader.tsx b/src/app/features/room/RoomViewHeader.tsx
index 97844eb84..30acb60ad 100644
--- a/src/app/features/room/RoomViewHeader.tsx
+++ b/src/app/features/room/RoomViewHeader.tsx
@@ -303,7 +303,7 @@ const CallMenu = forwardRef(
);
- }
+ },
);
function CallButton() {
@@ -398,7 +398,7 @@ export function RoomViewHeader({ callView }: { callView?: boolean }) {
const hasCallPermission = permissions.stateEvent(
StateEvent.GroupCallMemberPrefix,
- mx.getSafeUserId()
+ mx.getSafeUserId(),
);
const livekitSupported = useLivekitSupport();
const rtcSupported = webRTCSupported();
@@ -414,7 +414,7 @@ export function RoomViewHeader({ callView }: { callView?: boolean }) {
const name = useRoomName(room);
const topic = useRoomTopic(room);
const avatarUrl = avatarMxc
- ? mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, avatarMxc, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
const [peopleDrawer, setPeopleDrawer] = useSetting(settingsAtom, 'isPeopleDrawer');
diff --git a/src/app/features/room/RoomViewTyping.tsx b/src/app/features/room/RoomViewTyping.tsx
index af965f6ed..3f9149de5 100644
--- a/src/app/features/room/RoomViewTyping.tsx
+++ b/src/app/features/room/RoomViewTyping.tsx
@@ -27,10 +27,10 @@ export const RoomViewTyping = as<'div', RoomViewTypingProps>(
.filter((receipt) => receipt.userId !== myUserId)
.map(
(receipt) =>
- getMemberDisplayName(room, receipt.userId) ?? getMxIdLocalPart(receipt.userId)
+ getMemberDisplayName(room, receipt.userId) ?? getMxIdLocalPart(receipt.userId),
)
.reverse(),
- [typingMembers, myUserId, room]
+ [typingMembers, myUserId, room],
);
if (typingNames.length === 0) {
@@ -45,7 +45,7 @@ export const RoomViewTyping = as<'div', RoomViewTypingProps>(
type: 'DELETE',
roomId: room.roomId,
userId: receipt.userId,
- })
+ }),
);
};
@@ -129,5 +129,5 @@ export const RoomViewTyping = as<'div', RoomViewTypingProps>(
);
- }
+ },
);
diff --git a/src/app/features/room/jump-to-time/JumpToTime.tsx b/src/app/features/room/jump-to-time/JumpToTime.tsx
index a9c041c91..ef75da4dc 100644
--- a/src/app/features/room/jump-to-time/JumpToTime.tsx
+++ b/src/app/features/room/jump-to-time/JumpToTime.tsx
@@ -73,8 +73,8 @@ export function JumpToTime({ onCancel, onSubmit }: JumpToTimeProps) {
const result = await mx.timestampToEvent(room.roomId, newTs, Direction.Forward);
return result.event_id;
},
- [mx, room]
- )
+ [mx, room],
+ ),
);
const handleSubmit = () => {
diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx
index f28e91bdc..058762ced 100644
--- a/src/app/features/room/message/Message.tsx
+++ b/src/app/features/room/message/Message.tsx
@@ -176,7 +176,7 @@ export const MessageQuickReactions = as<'div', MessageQuickReactionsProps>(
>
);
- }
+ },
);
export const MessageAllReactionItem = as<
@@ -461,8 +461,8 @@ export const MessageDeleteItem = as<
useCallback(
(eventId: string, reason?: string) =>
mx.redactEvent(room.roomId, eventId, undefined, reason ? { reason } : undefined),
- [mx, room]
- )
+ [mx, room],
+ ),
);
const handleSubmit: FormEventHandler = (evt) => {
@@ -590,8 +590,8 @@ export const MessageReportItem = as<
useCallback(
(eventId: string, score: number, reason: string) =>
mx.reportEvent(room.roomId, eventId, score, reason),
- [mx, room]
- )
+ [mx, room],
+ ),
);
const handleSubmit: FormEventHandler = (evt) => {
@@ -726,7 +726,7 @@ export type MessageProps = {
onUsernameClick: MouseEventHandler;
onReplyClick: (
ev: Parameters>[0],
- startThread?: boolean
+ startThread?: boolean,
) => void;
onEditId?: (eventId?: string) => void;
onReactionToggle: (targetEventId: string, key: string, shortcode?: string) => void;
@@ -776,7 +776,7 @@ export const Message = React.memo(
children,
...props
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
@@ -784,7 +784,7 @@ export const Message = React.memo(
const readPositions = useReadPositions();
const readReceiptUsers = hideReadReceipts
? []
- : readPositions.get(mEvent.getId() ?? '') ?? [];
+ : (readPositions.get(mEvent.getId() ?? '') ?? []);
const isMine = mEvent.getSender() === mx.getUserId();
const lotusTerminal = lotusTerminalProp;
@@ -870,8 +870,8 @@ export const Message = React.memo(
userId={senderId}
src={
senderAvatarMxc
- ? mxcUrlToHttp(mx, senderAvatarMxc, useAuthentication, 48, 48, 'crop') ??
- undefined
+ ? (mxcUrlToHttp(mx, senderAvatarMxc, useAuthentication, 48, 48, 'crop') ??
+ undefined)
: undefined
}
alt={senderDisplayName}
@@ -1254,8 +1254,8 @@ export const Message = React.memo(
)}
);
- }
- )
+ },
+ ),
);
export type EventProps = {
@@ -1282,7 +1282,7 @@ export const Event = React.memo(
children,
...props
},
- ref
+ ref,
) => {
const mx = useMatrixClient();
const [hover, setHover] = useState(false);
@@ -1409,6 +1409,6 @@ export const Event = React.memo(
{children}
);
- }
- )
+ },
+ ),
);
diff --git a/src/app/features/room/message/MessageEditor.tsx b/src/app/features/room/message/MessageEditor.tsx
index a09ad24d4..1d804b4e5 100644
--- a/src/app/features/room/message/MessageEditor.tsx
+++ b/src/app/features/room/message/MessageEditor.tsx
@@ -78,7 +78,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
const getPrevBodyAndFormattedBody = useCallback((): [
string | undefined,
string | undefined,
- IMentions | undefined
+ IMentions | undefined,
] => {
const evtId = mEvent.getId()!;
const evtTimeline = room.getTimelineForEvent(evtId);
@@ -105,7 +105,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
allowTextFormatting: true,
allowBlockMarkdown: isMarkdown,
allowInlineMarkdown: isMarkdown,
- })
+ }),
);
const [prevBody, prevCustomHtml, prevMentions] = getPrevBodyAndFormattedBody();
@@ -154,7 +154,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
};
return mx.sendMessage(roomId, content);
- }, [mx, editor, roomId, mEvent, isMarkdown, getPrevBodyAndFormattedBody])
+ }, [mx, editor, roomId, mEvent, isMarkdown, getPrevBodyAndFormattedBody]),
);
const handleSave = useCallback(() => {
@@ -177,7 +177,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
onCancel();
}
},
- [onCancel, handleSave, enterForNewline, isComposing]
+ [onCancel, handleSave, enterForNewline, isComposing],
);
const handleKeyUp: KeyboardEventHandler = useCallback(
@@ -193,7 +193,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
: undefined;
setAutocompleteQuery(query);
},
- [editor]
+ [editor],
);
const handleCloseAutocomplete = useCallback(() => {
@@ -330,7 +330,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
onClick={
((evt) =>
setAnchor(
- evt.currentTarget.getBoundingClientRect()
+ evt.currentTarget.getBoundingClientRect(),
)) as MouseEventHandler
}
variant="SurfaceVariant"
@@ -355,5 +355,5 @@ export const MessageEditor = as<'div', MessageEditorProps>(
/>
);
- }
+ },
);
diff --git a/src/app/features/room/message/Reactions.tsx b/src/app/features/room/message/Reactions.tsx
index f0f308bbc..6481e095f 100644
--- a/src/app/features/room/message/Reactions.tsx
+++ b/src/app/features/room/message/Reactions.tsx
@@ -39,7 +39,7 @@ export const Reactions = as<'div', ReactionsProps>(
const myUserId = mx.getUserId();
const reactions = useRelations(
relations,
- useCallback((rel) => [...(rel.getSortedAnnotationsByKey() ?? [])], [])
+ useCallback((rel) => [...(rel.getSortedAnnotationsByKey() ?? [])], []),
);
const handleViewReaction: MouseEventHandler = (evt) => {
@@ -126,5 +126,5 @@ export const Reactions = as<'div', ReactionsProps>(
)}
);
- }
+ },
);
diff --git a/src/app/features/room/msgContent.ts b/src/app/features/room/msgContent.ts
index b0f6afb94..ac9c739e5 100644
--- a/src/app/features/room/msgContent.ts
+++ b/src/app/features/room/msgContent.ts
@@ -22,7 +22,7 @@ const generateThumbnailContent = async (
mx: MatrixClient,
img: HTMLImageElement | HTMLVideoElement,
dimensions: [number, number],
- encrypt: boolean
+ encrypt: boolean,
): Promise => {
const thumbnail = await getThumbnail(img, ...dimensions);
if (!thumbnail) throw new Error('Can not create thumbnail!');
@@ -46,7 +46,7 @@ const generateThumbnailContent = async (
export const getImageMsgContent = async (
mx: MatrixClient,
item: TUploadItem,
- mxc: string
+ mxc: string,
): Promise => {
const { file, originalFile, encInfo, metadata } = item;
const [imgError, imgEl] = await to(loadImageElement(getImageFileUrl(originalFile)));
@@ -80,7 +80,7 @@ export const getImageMsgContent = async (
export const getVideoMsgContent = async (
mx: MatrixClient,
item: TUploadItem,
- mxc: string
+ mxc: string,
): Promise => {
const { file, originalFile, encInfo, metadata } = item;
@@ -99,14 +99,14 @@ export const getVideoMsgContent = async (
mx,
videoEl,
getThumbnailDimensions(videoEl.videoWidth, videoEl.videoHeight),
- !!encInfo
- )
+ !!encInfo,
+ ),
);
if (thumbContent && thumbContent.thumbnail_info) {
thumbContent.thumbnail_info[MATRIX_BLUR_HASH_PROPERTY_NAME] = encodeBlurHash(
videoEl,
512,
- scaleYDimension(videoEl.videoWidth, 512, videoEl.videoHeight)
+ scaleYDimension(videoEl.videoWidth, 512, videoEl.videoHeight),
);
}
if (thumbError) console.warn(thumbError);
diff --git a/src/app/features/room/reaction-viewer/ReactionViewer.tsx b/src/app/features/room/reaction-viewer/ReactionViewer.tsx
index 8546dd67b..9561979f9 100644
--- a/src/app/features/room/reaction-viewer/ReactionViewer.tsx
+++ b/src/app/features/room/reaction-viewer/ReactionViewer.tsx
@@ -41,7 +41,7 @@ export const ReactionViewer = as<'div', ReactionViewerProps>(
const useAuthentication = useMediaAuthentication();
const reactions = useRelations(
relations,
- useCallback((rel) => [...(rel.getSortedAnnotationsByKey() ?? [])], [])
+ useCallback((rel) => [...(rel.getSortedAnnotationsByKey() ?? [])], []),
);
const space = useSpaceOptionally();
const openProfile = useOpenUserRoomProfile();
@@ -123,7 +123,7 @@ export const ReactionViewer = as<'div', ReactionViewerProps>(
'crop',
undefined,
false,
- useAuthentication
+ useAuthentication,
)
: undefined;
@@ -138,7 +138,7 @@ export const ReactionViewer = as<'div', ReactionViewerProps>(
space?.roomId,
senderId,
getMouseEventCords(event.nativeEvent),
- 'Bottom'
+ 'Bottom',
);
}}
before={
@@ -166,5 +166,5 @@ export const ReactionViewer = as<'div', ReactionViewerProps>(
);
- }
+ },
);
diff --git a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
index 362caac97..ae3323722 100644
--- a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
+++ b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
@@ -124,7 +124,7 @@ function PinnedMessage({
};
return mx.sendStateEvent(room.roomId, StateEvent.RoomPinnedEvents as any, newContent);
- }, [room, eventId, mx])
+ }, [room, eventId, mx]),
);
const handleOpenClick: MouseEventHandler = (evt) => {
@@ -199,8 +199,8 @@ function PinnedMessage({
userId={sender}
src={
senderAvatarMxc
- ? mxcUrlToHttp(mx, senderAvatarMxc, useAuthentication, 48, 48, 'crop') ??
- undefined
+ ? (mxcUrlToHttp(mx, senderAvatarMxc, useAuthentication, 48, 48, 'crop') ??
+ undefined)
: undefined
}
alt={displayName}
@@ -266,7 +266,7 @@ export const RoomPinMenu = forwardRef(
const accessibleTagColors = useAccessiblePowerTagColors(
theme.kind,
creatorsTag,
- powerLevelTags
+ powerLevelTags,
);
const pinnedEvents = useRoomPinnedEvents(room);
@@ -298,10 +298,10 @@ export const RoomPinMenu = forwardRef(
() => ({
...LINKIFY_OPTS,
render: factoryRenderLinkifyWithMention((href) =>
- renderMatrixMention(mx, room.roomId, href, makeMentionCustomProps(mentionClickHandler))
+ renderMatrixMention(mx, room.roomId, href, makeMentionCustomProps(mentionClickHandler)),
),
}),
- [mx, room, mentionClickHandler]
+ [mx, room, mentionClickHandler],
);
const htmlReactParserOptions = useMemo(
() =>
@@ -311,7 +311,7 @@ export const RoomPinMenu = forwardRef(
handleSpoilerClick: spoilerClickHandler,
handleMentionClick: mentionClickHandler,
}),
- [mx, room, linkifyOpts, mentionClickHandler, spoilerClickHandler, useAuthentication]
+ [mx, room, linkifyOpts, mentionClickHandler, spoilerClickHandler, useAuthentication],
);
const renderMatrixEvent = useMatrixEventRenderer<[MatrixEvent, string, GetContentCallback]>(
@@ -442,7 +442,7 @@ export const RoomPinMenu = forwardRef(
);
- }
+ },
);
const handleOpen = (roomId: string, eventId: string) => {
@@ -542,5 +542,5 @@ export const RoomPinMenu = forwardRef(
);
- }
+ },
);
diff --git a/src/app/features/search/Search.tsx b/src/app/features/search/Search.tsx
index cfc4ee5fb..82bdade47 100644
--- a/src/app/features/search/Search.tsx
+++ b/src/app/features/search/Search.tsx
@@ -77,7 +77,7 @@ const useTopActiveRooms = (
searchRoomType: SearchRoomType | undefined,
rooms: string[],
directs: string[],
- spaces: string[]
+ spaces: string[],
) => {
const mx = useMatrixClient();
@@ -98,7 +98,7 @@ const useTopActiveRooms = (
const getDmUserId = (
roomId: string,
getRoom: (roomId: string) => Room | undefined,
- myUserId: string
+ myUserId: string,
): string | undefined => {
const room = getRoom(roomId);
const targetUserId = room && guessDmRoomUserId(room, myUserId);
@@ -109,7 +109,7 @@ const useSearchTargetRooms = (
searchRoomType: SearchRoomType | undefined,
rooms: string[],
directs: string[],
- spaces: string[]
+ spaces: string[],
) =>
useMemo(() => {
if (searchRoomType === undefined) {
@@ -167,7 +167,7 @@ export function Search({ requestClose }: SearchProps) {
}
return roomName;
},
- [getRoom, mDirects, mx]
+ [getRoom, mDirects, mx],
);
const [result, search, resetSearch] = useAsyncSearch(targetRooms, getTargetStr, SEARCH_OPTIONS);
@@ -441,8 +441,8 @@ export function SearchModalRenderer() {
setOpen(true);
}
},
- [opened, setOpen]
- )
+ [opened, setOpen],
+ ),
);
return opened && setOpen(false)} />;
diff --git a/src/app/features/settings/Settings.tsx b/src/app/features/settings/Settings.tsx
index 7e1693462..f8f99697c 100644
--- a/src/app/features/settings/Settings.tsx
+++ b/src/app/features/settings/Settings.tsx
@@ -89,7 +89,7 @@ const useSettingsMenuItems = (): SettingsMenuItem[] =>
icon: Icons.Info,
},
],
- []
+ [],
);
type SettingsProps = {
@@ -103,7 +103,7 @@ export function Settings({ initialPage, requestClose }: SettingsProps) {
const profile = useUserProfile(userId);
const displayName = profile.displayName ?? getMxIdLocalPart(userId) ?? userId;
const avatarUrl = profile.avatarUrl
- ? mxcUrlToHttp(mx, profile.avatarUrl, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, profile.avatarUrl, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
const screenSize = useScreenSizeContext();
diff --git a/src/app/features/settings/account/ContactInfo.tsx b/src/app/features/settings/account/ContactInfo.tsx
index cfde7e296..ec6bca105 100644
--- a/src/app/features/settings/account/ContactInfo.tsx
+++ b/src/app/features/settings/account/ContactInfo.tsx
@@ -9,7 +9,7 @@ import { AsyncStatus, useAsyncCallback } from '../../../hooks/useAsyncCallback';
export function ContactInformation() {
const mx = useMatrixClient();
const [threePIdsState, loadThreePIds] = useAsyncCallback(
- useCallback(() => mx.getThreePids(), [mx])
+ useCallback(() => mx.getThreePids(), [mx]),
);
const threePIds =
threePIdsState.status === AsyncStatus.Success ? threePIdsState.data.threepids : undefined;
diff --git a/src/app/features/settings/account/IgnoredUserList.tsx b/src/app/features/settings/account/IgnoredUserList.tsx
index 574f73525..8b52faa3f 100644
--- a/src/app/features/settings/account/IgnoredUserList.tsx
+++ b/src/app/features/settings/account/IgnoredUserList.tsx
@@ -19,8 +19,8 @@ function IgnoreUserInput({ userList }: { userList: string[] }) {
async (uId: string) => {
await mx.setIgnoredUsers([...userList, uId]);
},
- [mx, userList]
- )
+ [mx, userList],
+ ),
);
const ignoring = ignoreState.status === AsyncStatus.Loading;
@@ -102,8 +102,8 @@ function IgnoredUserChip({ userId, userList }: { userId: string; userList: strin
const [unignoreState, unignore] = useAsyncCallback(
useCallback(
() => mx.setIgnoredUsers(userList.filter((uId) => uId !== userId)),
- [mx, userId, userList]
- )
+ [mx, userId, userList],
+ ),
);
const handleUnignore = () => unignore();
diff --git a/src/app/features/settings/account/Profile.tsx b/src/app/features/settings/account/Profile.tsx
index 98c0227f7..9b9ca3da5 100644
--- a/src/app/features/settings/account/Profile.tsx
+++ b/src/app/features/settings/account/Profile.tsx
@@ -57,7 +57,7 @@ function ProfileAvatar({ profile, userId }: ProfileProps) {
const defaultDisplayName = profile.displayName ?? getMxIdLocalPart(userId) ?? userId;
const avatarUrl = profile.avatarUrl
- ? mxcUrlToHttp(mx, profile.avatarUrl, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, profile.avatarUrl, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
const [imageFile, setImageFile] = useState();
@@ -79,7 +79,7 @@ function ProfileAvatar({ profile, userId }: ProfileProps) {
mx.setAvatarUrl(mxc);
handleRemoveUpload();
},
- [mx, handleRemoveUpload]
+ [mx, handleRemoveUpload],
);
const handleRemoveAvatar = () => {
@@ -219,7 +219,7 @@ function ProfileDisplayName({ profile, userId }: ProfileProps) {
const [displayName, setDisplayName] = useState(defaultDisplayName);
const [changeState, changeDisplayName] = useAsyncCallback(
- useCallback((name: string) => mx.setDisplayName(name), [mx])
+ useCallback((name: string) => mx.setDisplayName(name), [mx]),
);
const changingDisplayName = changeState.status === AsyncStatus.Loading;
diff --git a/src/app/features/settings/developer-tools/AccountData.tsx b/src/app/features/settings/developer-tools/AccountData.tsx
index 8bccb62ec..81dd8e44b 100644
--- a/src/app/features/settings/developer-tools/AccountData.tsx
+++ b/src/app/features/settings/developer-tools/AccountData.tsx
@@ -15,14 +15,14 @@ type AccountDataProps = {
export function AccountData({ expand, onExpandToggle, onSelect }: AccountDataProps) {
const mx = useMatrixClient();
const [accountDataTypes, setAccountDataKeys] = useState(() =>
- Array.from(mx.store.accountData.keys())
+ Array.from(mx.store.accountData.keys()),
);
useAccountDataCallback(
mx,
useCallback(() => {
setAccountDataKeys(Array.from(mx.store.accountData.keys()));
- }, [mx])
+ }, [mx]),
);
return (
diff --git a/src/app/features/settings/developer-tools/DevelopTools.tsx b/src/app/features/settings/developer-tools/DevelopTools.tsx
index 63037ac18..a758e96b8 100644
--- a/src/app/features/settings/developer-tools/DevelopTools.tsx
+++ b/src/app/features/settings/developer-tools/DevelopTools.tsx
@@ -27,7 +27,7 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
async (type, content) => {
await mx.setAccountData(type, content);
},
- [mx]
+ [mx],
);
if (accountDataType !== undefined) {
diff --git a/src/app/features/settings/devices/DeviceTile.tsx b/src/app/features/settings/devices/DeviceTile.tsx
index c966d152c..efc8de0f0 100644
--- a/src/app/features/settings/devices/DeviceTile.tsx
+++ b/src/app/features/settings/devices/DeviceTile.tsx
@@ -86,7 +86,7 @@ export function DeviceKeyDetails({ crypto }: DeviceKeyDetailsProps) {
useCallback(() => {
const keys = crypto.getOwnDeviceKeys();
return keys;
- }, [crypto])
+ }, [crypto]),
);
useEffect(() => {
@@ -118,8 +118,8 @@ function DeviceRename({ device, onCancel, onRename, refreshDeviceList }: DeviceR
await mx.setDeviceDetails(device.device_id, { display_name: name });
await refreshDeviceList();
},
- [mx, device.device_id, refreshDeviceList]
- )
+ [mx, device.device_id, refreshDeviceList],
+ ),
);
const renaming = renameState.status === AsyncStatus.Loading;
diff --git a/src/app/features/settings/devices/Devices.tsx b/src/app/features/settings/devices/Devices.tsx
index 22a46f396..1f8fc3d37 100644
--- a/src/app/features/settings/devices/Devices.tsx
+++ b/src/app/features/settings/devices/Devices.tsx
@@ -49,19 +49,19 @@ export function Devices({ requestClose }: DevicesProps) {
const verificationStatus = useDeviceVerificationStatus(
crypto,
mx.getSafeUserId(),
- currentDevice?.device_id
+ currentDevice?.device_id,
);
const otherDevicesId = useDeviceIds(otherDevices);
const unverifiedDeviceCount = useUnverifiedDeviceCount(
crypto,
mx.getSafeUserId(),
- otherDevicesId
+ otherDevicesId,
);
const defaultSecretStorageKeyId = useSecretStorageDefaultKeyId();
const defaultSecretStorageKeyContent = useSecretStorageKeyContent(
- defaultSecretStorageKeyId ?? ''
+ defaultSecretStorageKeyId ?? '',
);
return (
diff --git a/src/app/features/settings/devices/LocalBackup.tsx b/src/app/features/settings/devices/LocalBackup.tsx
index db6504fc4..5c39f1e1f 100644
--- a/src/app/features/settings/devices/LocalBackup.tsx
+++ b/src/app/features/settings/devices/LocalBackup.tsx
@@ -30,8 +30,8 @@ function ExportKeys() {
});
FileSaver.saveAs(blob, 'lotus-keys.txt');
},
- [mx]
- )
+ [mx],
+ ),
);
const exporting = exportState.status === AsyncStatus.Loading;
@@ -176,8 +176,8 @@ function ImportKeys({ file, onDone }: ImportKeysProps) {
await crypto.importRoomKeysAsJson(keys);
},
- [file, mx]
- )
+ [file, mx],
+ ),
);
const decrypting = decryptState.status === AsyncStatus.Loading;
diff --git a/src/app/features/settings/devices/OtherDevices.tsx b/src/app/features/settings/devices/OtherDevices.tsx
index 4bd83dd6c..e1e8aada4 100644
--- a/src/app/features/settings/devices/OtherDevices.tsx
+++ b/src/app/features/settings/devices/OtherDevices.tsx
@@ -37,7 +37,7 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
withSearchParam(authUrl, {
action: accountManagementActions.sessionsList,
}),
- '_blank'
+ '_blank',
);
}, [authMetadata, accountManagementActions]);
@@ -51,10 +51,10 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
action: accountManagementActions.sessionEnd,
device_id: deviceId,
}),
- '_blank'
+ '_blank',
);
},
- [authMetadata, accountManagementActions]
+ [authMetadata, accountManagementActions],
);
const handleToggleDelete = useCallback((deviceId: string) => {
@@ -78,7 +78,7 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
async (authDict?: AuthDict) => {
await mx.deleteMultipleDevices(Array.from(deleted), authDict);
},
- [mx, deleted]
+ [mx, deleted],
),
useCallback(
(state: typeof deleteState) => {
@@ -88,11 +88,11 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
}
setDeleteState(state);
},
- [refreshDeviceList]
- )
+ [refreshDeviceList],
+ ),
);
const [authData, deleteError] = useUIAMatrixError(
- deleteState.status === AsyncStatus.Error ? deleteState.error : undefined
+ deleteState.status === AsyncStatus.Error ? deleteState.error : undefined,
);
const deleting = deleteState.status === AsyncStatus.Loading || authData !== undefined;
diff --git a/src/app/features/settings/devices/Verification.tsx b/src/app/features/settings/devices/Verification.tsx
index 5223df2cc..2de34e31f 100644
--- a/src/app/features/settings/devices/Verification.tsx
+++ b/src/app/features/settings/devices/Verification.tsx
@@ -177,7 +177,7 @@ export function VerifyOtherDeviceTile({ crypto, deviceId }: VerifyOtherDeviceTil
const requestPromise = crypto.requestDeviceVerification(mx.getSafeUserId(), deviceId);
return requestPromise;
}, [mx, crypto, deviceId]),
- setRequestState
+ setRequestState,
);
const handleExit = useCallback(() => {
@@ -277,7 +277,7 @@ export function DeviceVerificationOptions() {
withSearchParam(authUrl, {
action: accountManagementActions.crossSigningReset,
}),
- '_blank'
+ '_blank',
);
return;
}
diff --git a/src/app/features/settings/emojis-stickers/GlobalPacks.tsx b/src/app/features/settings/emojis-stickers/GlobalPacks.tsx
index 6c3edc1ad..910f5552c 100644
--- a/src/app/features/settings/emojis-stickers/GlobalPacks.tsx
+++ b/src/app/features/settings/emojis-stickers/GlobalPacks.tsx
@@ -95,7 +95,7 @@ function GlobalPackSelector({
const removeSelected = (adds: PackAddress[]) => {
setSelected((addresses) => {
const newAddresses = addresses.filter(
- (addr) => !adds.find((address) => packAddressEqual(addr, address))
+ (addr) => !adds.find((address) => packAddressEqual(addr, address)),
);
return newAddresses;
});
@@ -141,7 +141,7 @@ function GlobalPackSelector({
.map((pack) => pack.address)
.filter((addr) => addr !== undefined);
const allSelected = roomPackAddresses.every((addr) =>
- selected.find((address) => packAddressEqual(addr, address))
+ selected.find((address) => packAddressEqual(addr, address)),
);
return (
@@ -269,9 +269,9 @@ export function GlobalPacks({ onViewPack }: GlobalPacksProps) {
const nonGlobalPacks = useMemo(
() =>
roomsImagePack.filter(
- (pack) => !globalPacks.find((p) => packAddressEqual(pack.address, p.address))
+ (pack) => !globalPacks.find((p) => packAddressEqual(pack.address, p.address)),
),
- [roomsImagePack, globalPacks]
+ [roomsImagePack, globalPacks],
);
const [selectedPacks, setSelectedPacks] = useState([]);
@@ -280,9 +280,9 @@ export function GlobalPacks({ onViewPack }: GlobalPacksProps) {
const unselectedGlobalPacks = useMemo(
() =>
nonGlobalPacks.filter(
- (pack) => !selectedPacks.find((addr) => packAddressEqual(pack.address, addr))
+ (pack) => !selectedPacks.find((addr) => packAddressEqual(pack.address, addr)),
),
- [selectedPacks, nonGlobalPacks]
+ [selectedPacks, nonGlobalPacks],
);
const handleRemove = (address: PackAddress) => {
@@ -321,7 +321,7 @@ export function GlobalPacks({ onViewPack }: GlobalPacksProps) {
});
await mx.setAccountData(AccountDataEvent.PoniesEmoteRooms, updatedContent);
- }, [mx, selectedPacks, removedPacks])
+ }, [mx, selectedPacks, removedPacks]),
);
const resetChanges = useCallback(() => {
diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx
index 292bc68a2..152e87172 100644
--- a/src/app/features/settings/general/General.tsx
+++ b/src/app/features/settings/general/General.tsx
@@ -85,7 +85,7 @@ const ThemeSelector = as<'div', ThemeSelectorProps>(
))}
- )
+ ),
);
function SelectTheme({ disabled }: { disabled?: boolean }) {
@@ -321,7 +321,7 @@ function Appearance() {
const [twitterEmoji, setTwitterEmoji] = useSetting(settingsAtom, 'twitterEmoji');
const [perMessageProfiles, setPerMessageProfiles] = useSetting(
settingsAtom,
- 'perMessageProfiles'
+ 'perMessageProfiles',
);
const [lotusTerminal, setLotusTerminal] = useSetting(settingsAtom, 'lotusTerminal');
@@ -831,7 +831,7 @@ function Calls() {
const [cameraOnJoin, setCameraOnJoin] = useSetting(settingsAtom, 'cameraOnJoin');
const [callNoiseSuppression, setCallNoiseSuppression] = useSetting(
settingsAtom,
- 'callNoiseSuppression'
+ 'callNoiseSuppression',
);
const [pttMode, setPttMode] = useSetting(settingsAtom, 'pttMode');
const [pttKey, setPttKey] = useSetting(settingsAtom, 'pttKey');
@@ -843,7 +843,7 @@ function Calls() {
if (keyListenerRef.current)
window.removeEventListener('keydown', keyListenerRef.current, true);
},
- []
+ [],
);
const handleKeyBind = useCallback(() => {
@@ -1104,15 +1104,15 @@ function SelectMessageSpacing() {
function Messages() {
const [legacyUsernameColor, setLegacyUsernameColor] = useSetting(
settingsAtom,
- 'legacyUsernameColor'
+ 'legacyUsernameColor',
);
const [hideMembershipEvents, setHideMembershipEvents] = useSetting(
settingsAtom,
- 'hideMembershipEvents'
+ 'hideMembershipEvents',
);
const [hideNickAvatarEvents, setHideNickAvatarEvents] = useSetting(
settingsAtom,
- 'hideNickAvatarEvents'
+ 'hideNickAvatarEvents',
);
const [mediaAutoLoad, setMediaAutoLoad] = useSetting(settingsAtom, 'mediaAutoLoad');
const [urlPreview, setUrlPreview] = useSetting(settingsAtom, 'urlPreview');
diff --git a/src/app/features/settings/notifications/AllMessages.tsx b/src/app/features/settings/notifications/AllMessages.tsx
index 301cb9a7b..787d41986 100644
--- a/src/app/features/settings/notifications/AllMessages.tsx
+++ b/src/app/features/settings/notifications/AllMessages.tsx
@@ -18,7 +18,7 @@ import { useMatrixClient } from '../../../hooks/useMatrixClient';
const getAllMessageDefaultRule = (
ruleId: RuleId,
encrypted: boolean,
- oneToOne: boolean
+ oneToOne: boolean,
): PushRuleData => {
const conditions: PushRuleCondition[] = [];
if (oneToOne)
@@ -66,7 +66,7 @@ function AllMessagesModeSwitcher({
const actions = getModeActions(mode);
await mx.setPushRuleActions('global', kind, ruleId, actions);
},
- [mx, getModeActions, kind, ruleId]
+ [mx, getModeActions, kind, ruleId],
);
return ;
@@ -76,7 +76,7 @@ export function AllMessagesNotifications() {
const pushRulesEvt = useAccountData(AccountDataEvent.PushRules);
const pushRules = useMemo(
() => pushRulesEvt?.getContent() ?? { global: {} },
- [pushRulesEvt]
+ [pushRulesEvt],
);
return (
diff --git a/src/app/features/settings/notifications/KeywordMessages.tsx b/src/app/features/settings/notifications/KeywordMessages.tsx
index 301505a1d..d9cecea83 100644
--- a/src/app/features/settings/notifications/KeywordMessages.tsx
+++ b/src/app/features/settings/notifications/KeywordMessages.tsx
@@ -33,8 +33,8 @@ function KeywordInput() {
});
setKeyword('');
},
- [mx]
- )
+ [mx],
+ ),
);
const addingKeyword = keywordState.status === AsyncStatus.Loading;
@@ -114,8 +114,8 @@ function KeywordCross({ pushRule }: PushRulesProps) {
const [removeState, remove] = useAsyncCallback(
useCallback(
() => mx.deletePushRule('global', PushRuleKind.ContentSpecific, pushRule.rule_id),
- [mx, pushRule]
- )
+ [mx, pushRule],
+ ),
);
const removing = removeState.status === AsyncStatus.Loading;
@@ -145,10 +145,10 @@ function KeywordModeSwitcher({ pushRule }: PushRulesProps) {
'global',
PushRuleKind.ContentSpecific,
pushRule.rule_id,
- actions
+ actions,
);
},
- [mx, getModeActions, pushRule]
+ [mx, getModeActions, pushRule],
);
return ;
@@ -158,13 +158,13 @@ export function KeywordMessagesNotifications() {
const pushRulesEvt = useAccountData(AccountDataEvent.PushRules);
const pushRules = useMemo(
() => pushRulesEvt?.getContent() ?? { global: {} },
- [pushRulesEvt]
+ [pushRulesEvt],
);
const keywordPushRules = useMemo(() => {
const content = pushRules.global.content ?? [];
return content.filter(
- (pushRule) => pushRule.default === false && typeof pushRule.pattern === 'string'
+ (pushRule) => pushRule.default === false && typeof pushRule.pattern === 'string',
);
}, [pushRules]);
diff --git a/src/app/features/settings/notifications/NotificationModeSwitcher.tsx b/src/app/features/settings/notifications/NotificationModeSwitcher.tsx
index fe008390d..8fd524341 100644
--- a/src/app/features/settings/notifications/NotificationModeSwitcher.tsx
+++ b/src/app/features/settings/notifications/NotificationModeSwitcher.tsx
@@ -28,7 +28,7 @@ const useNotificationModeStr = (): Record =>
[NotificationMode.Notify]: 'Notify Silent',
[NotificationMode.NotifyLoud]: 'Notify Loud',
}),
- []
+ [],
);
type NotificationModeSwitcherProps = {
diff --git a/src/app/features/settings/notifications/SpecialMessages.tsx b/src/app/features/settings/notifications/SpecialMessages.tsx
index cbebf648f..275c71b71 100644
--- a/src/app/features/settings/notifications/SpecialMessages.tsx
+++ b/src/app/features/settings/notifications/SpecialMessages.tsx
@@ -32,7 +32,7 @@ const getDefaultIsUserMention = (userId: string): PushRuleData =>
key: 'content.m\\.mentions.user_ids',
value: userId,
},
- ]
+ ],
);
const DefaultContainsDisplayName = makePushRuleData(
@@ -43,7 +43,7 @@ const DefaultContainsDisplayName = makePushRuleData(
{
kind: ConditionKind.ContainsDisplayName,
},
- ]
+ ],
);
const getDefaultContainsUsername = (username: string) =>
@@ -52,7 +52,7 @@ const getDefaultContainsUsername = (username: string) =>
RuleId.ContainsUserName,
getNotificationModeActions(NotificationMode.NotifyLoud, { highlight: true }),
undefined,
- username
+ username,
);
const DefaultIsRoomMention = makePushRuleData(
@@ -69,7 +69,7 @@ const DefaultIsRoomMention = makePushRuleData(
kind: ConditionKind.SenderNotificationPermission,
key: 'room',
},
- ]
+ ],
);
const DefaultAtRoomNotification = makePushRuleData(
@@ -86,7 +86,7 @@ const DefaultAtRoomNotification = makePushRuleData(
kind: ConditionKind.SenderNotificationPermission,
key: 'room',
},
- ]
+ ],
);
type PushRulesProps = {
@@ -105,7 +105,7 @@ function MentionModeSwitcher({ ruleId, pushRules, defaultPushRuleData }: PushRul
const actions = getModeActions(mode);
await mx.setPushRuleActions('global', kind, ruleId, actions);
},
- [mx, getModeActions, kind, ruleId]
+ [mx, getModeActions, kind, ruleId],
);
return ;
@@ -118,7 +118,7 @@ export function SpecialMessagesNotifications() {
const pushRulesEvt = useAccountData(AccountDataEvent.PushRules);
const pushRules = useMemo(
() => pushRulesEvt?.getContent() ?? { global: {} },
- [pushRulesEvt]
+ [pushRulesEvt],
);
return (
diff --git a/src/app/features/settings/notifications/SystemNotification.tsx b/src/app/features/settings/notifications/SystemNotification.tsx
index 460002360..020cf9239 100644
--- a/src/app/features/settings/notifications/SystemNotification.tsx
+++ b/src/app/features/settings/notifications/SystemNotification.tsx
@@ -39,8 +39,8 @@ function EmailNotification() {
kind: null,
} as unknown as IPusherRequest);
},
- [mx]
- )
+ [mx],
+ ),
);
const handleChange = (value: boolean) => {
@@ -89,7 +89,7 @@ export function SystemNotification() {
const [showNotifications, setShowNotifications] = useSetting(settingsAtom, 'showNotifications');
const [isNotificationSounds, setIsNotificationSounds] = useSetting(
settingsAtom,
- 'isNotificationSounds'
+ 'isNotificationSounds',
);
const requestNotificationPermission = () => {
diff --git a/src/app/features/space-settings/SpaceSettings.tsx b/src/app/features/space-settings/SpaceSettings.tsx
index e641516b4..bdb965e32 100644
--- a/src/app/features/space-settings/SpaceSettings.tsx
+++ b/src/app/features/space-settings/SpaceSettings.tsx
@@ -53,7 +53,7 @@ const useSpaceSettingsMenuItems = (): SpaceSettingsMenuItem[] =>
icon: Icons.Terminal,
},
],
- []
+ [],
);
type SpaceSettingsProps = {
@@ -71,7 +71,7 @@ export function SpaceSettings({ initialPage, requestClose }: SpaceSettingsProps)
const joinRuleContent = useRoomJoinRule(room);
const avatarUrl = roomAvatar
- ? mxcUrlToHttp(mx, roomAvatar, useAuthentication, 96, 96, 'crop') ?? undefined
+ ? (mxcUrlToHttp(mx, roomAvatar, useAuthentication, 96, 96, 'crop') ?? undefined)
: undefined;
const screenSize = useScreenSizeContext();
diff --git a/src/app/hooks/media/useMediaLoading.ts b/src/app/hooks/media/useMediaLoading.ts
index 9d7320103..ce058a98f 100644
--- a/src/app/hooks/media/useMediaLoading.ts
+++ b/src/app/hooks/media/useMediaLoading.ts
@@ -6,7 +6,7 @@ export type MediaLoadingData = {
};
export const useMediaLoading = (
- getTargetElement: () => HTMLMediaElement | null
+ getTargetElement: () => HTMLMediaElement | null,
): MediaLoadingData => {
const [loadingData, setLoadingData] = useState({
loading: false,
diff --git a/src/app/hooks/media/useMediaPlay.ts b/src/app/hooks/media/useMediaPlay.ts
index e175eee21..5ed61ad5f 100644
--- a/src/app/hooks/media/useMediaPlay.ts
+++ b/src/app/hooks/media/useMediaPlay.ts
@@ -9,7 +9,7 @@ export type MediaPlayControl = {
};
export const useMediaPlay = (
- getTargetElement: () => HTMLMediaElement | null
+ getTargetElement: () => HTMLMediaElement | null,
): MediaPlayData & MediaPlayControl => {
const [playing, setPlay] = useState(false);
@@ -20,7 +20,7 @@ export const useMediaPlay = (
if (play) targetEl.play();
else targetEl.pause();
},
- [getTargetElement]
+ [getTargetElement],
);
useEffect(() => {
diff --git a/src/app/hooks/media/useMediaPlayTimeCallback.ts b/src/app/hooks/media/useMediaPlayTimeCallback.ts
index c70ddc6e8..8d332f700 100644
--- a/src/app/hooks/media/useMediaPlayTimeCallback.ts
+++ b/src/app/hooks/media/useMediaPlayTimeCallback.ts
@@ -4,7 +4,7 @@ export type PlayTimeCallback = (duration: number, currentTime: number) => void;
export const useMediaPlayTimeCallback = (
getTargetElement: () => HTMLMediaElement | null,
- onPlayTimeCallback: PlayTimeCallback
+ onPlayTimeCallback: PlayTimeCallback,
): void => {
useEffect(() => {
const targetEl = getTargetElement();
diff --git a/src/app/hooks/media/useMediaPlaybackRate.ts b/src/app/hooks/media/useMediaPlaybackRate.ts
index 173688450..b71be6510 100644
--- a/src/app/hooks/media/useMediaPlaybackRate.ts
+++ b/src/app/hooks/media/useMediaPlaybackRate.ts
@@ -8,7 +8,7 @@ export type MediaPlaybackRateControl = {
};
export const useMediaPlaybackRate = (
- getTargetElement: () => HTMLMediaElement | null
+ getTargetElement: () => HTMLMediaElement | null,
): MediaPlaybackRateData & MediaPlaybackRateControl => {
const [rate, setRate] = useState(1.0);
@@ -18,7 +18,7 @@ export const useMediaPlaybackRate = (
if (!targetEl) return;
targetEl.playbackRate = playbackRate;
},
- [getTargetElement]
+ [getTargetElement],
);
useEffect(() => {
diff --git a/src/app/hooks/media/useMediaSeek.ts b/src/app/hooks/media/useMediaSeek.ts
index 89c8d077c..28b524efc 100644
--- a/src/app/hooks/media/useMediaSeek.ts
+++ b/src/app/hooks/media/useMediaSeek.ts
@@ -9,7 +9,7 @@ export type MediaSeekControl = {
};
export const useMediaSeek = (
- getTargetElement: () => HTMLMediaElement | null
+ getTargetElement: () => HTMLMediaElement | null,
): MediaSeekData & MediaSeekControl => {
const [seekData, setSeekData] = useState({
seeking: false,
@@ -22,7 +22,7 @@ export const useMediaSeek = (
if (!targetEl) return;
targetEl.currentTime = time;
},
- [getTargetElement]
+ [getTargetElement],
);
useEffect(() => {
diff --git a/src/app/hooks/media/useMediaVolume.ts b/src/app/hooks/media/useMediaVolume.ts
index 605cee461..4e294b82a 100644
--- a/src/app/hooks/media/useMediaVolume.ts
+++ b/src/app/hooks/media/useMediaVolume.ts
@@ -11,7 +11,7 @@ export type MediaVolumeControl = {
};
export const useMediaVolume = (
- getTargetElement: () => HTMLMediaElement | null
+ getTargetElement: () => HTMLMediaElement | null,
): MediaVolumeData & MediaVolumeControl => {
const [volumeData, setVolumeData] = useState({
volume: 1,
@@ -24,7 +24,7 @@ export const useMediaVolume = (
if (!targetEl) return;
targetEl.muted = mute;
},
- [getTargetElement]
+ [getTargetElement],
);
const setVolume = useCallback(
@@ -33,7 +33,7 @@ export const useMediaVolume = (
if (!targetEl) return;
targetEl.volume = volume;
},
- [getTargetElement]
+ [getTargetElement],
);
useEffect(() => {
diff --git a/src/app/hooks/types.ts b/src/app/hooks/types.ts
index 9aac2b314..14d7052bb 100644
--- a/src/app/hooks/types.ts
+++ b/src/app/hooks/types.ts
@@ -8,5 +8,5 @@ export type RequestEmailTokenResponse = {
export type RequestEmailTokenCallback = (
email: string,
clientSecret: string,
- nextLink?: string
+ nextLink?: string,
) => Promise;
diff --git a/src/app/hooks/useAccountData.ts b/src/app/hooks/useAccountData.ts
index 30e47b475..923633a12 100644
--- a/src/app/hooks/useAccountData.ts
+++ b/src/app/hooks/useAccountData.ts
@@ -14,8 +14,8 @@ export function useAccountData(eventType: string) {
setEvent(evt);
}
},
- [eventType, setEvent]
- )
+ [eventType, setEvent],
+ ),
);
return event;
diff --git a/src/app/hooks/useAccountDataCallback.ts b/src/app/hooks/useAccountDataCallback.ts
index e12f1c4d2..01cb05a63 100644
--- a/src/app/hooks/useAccountDataCallback.ts
+++ b/src/app/hooks/useAccountDataCallback.ts
@@ -3,7 +3,7 @@ import { useEffect } from 'react';
export const useAccountDataCallback = (
mx: MatrixClient,
- onAccountData: ClientEventHandlerMap[ClientEvent.AccountData]
+ onAccountData: ClientEventHandlerMap[ClientEvent.AccountData],
) => {
useEffect(() => {
mx.on(ClientEvent.AccountData, onAccountData);
diff --git a/src/app/hooks/useAccountManagement.ts b/src/app/hooks/useAccountManagement.ts
index 5eafedc48..b5f0f4ee8 100644
--- a/src/app/hooks/useAccountManagement.ts
+++ b/src/app/hooks/useAccountManagement.ts
@@ -10,7 +10,7 @@ export const useAccountManagementActions = () => {
accountDeactivate: 'org.matrix.account_deactivate',
crossSigningReset: 'org.matrix.cross_signing_reset',
}),
- []
+ [],
);
return actions;
diff --git a/src/app/hooks/useAsyncCallback.ts b/src/app/hooks/useAsyncCallback.ts
index 5a0380f00..f3b0eb26c 100644
--- a/src/app/hooks/useAsyncCallback.ts
+++ b/src/app/hooks/useAsyncCallback.ts
@@ -33,7 +33,7 @@ export type AsyncCallback = (...args: TArgs) =>
export const useAsync = (
asyncCallback: AsyncCallback,
- onStateChange: (state: AsyncState) => void
+ onStateChange: (state: AsyncState) => void,
): AsyncCallback => {
const alive = useAlive();
@@ -90,14 +90,14 @@ export const useAsync = (
throw e;
}
},
- [asyncCallback, alive, onStateChange]
+ [asyncCallback, alive, onStateChange],
);
return callback;
};
export const useAsyncCallback = (
- asyncCallback: AsyncCallback
+ asyncCallback: AsyncCallback,
): [AsyncState, AsyncCallback] => {
const [state, setState] = useState>({
status: AsyncStatus.Idle,
@@ -109,7 +109,7 @@ export const useAsyncCallback = (
};
export const useAsyncCallbackValue = (
- asyncCallback: AsyncCallback<[], TData>
+ asyncCallback: AsyncCallback<[], TData>,
): [AsyncState, AsyncCallback<[], TData>] => {
const [state, load] = useAsyncCallback(asyncCallback);
diff --git a/src/app/hooks/useAsyncSearch.ts b/src/app/hooks/useAsyncSearch.ts
index 3852d3b97..8518a8bd1 100644
--- a/src/app/hooks/useAsyncSearch.ts
+++ b/src/app/hooks/useAsyncSearch.ts
@@ -19,7 +19,7 @@ export type UseAsyncSearchOptions = AsyncSearchOption & {
export type SearchItemStrGetter = (
searchItem: TSearchItem,
- query: string
+ query: string,
) => string | string[];
export type UseAsyncSearchResult = {
@@ -32,11 +32,11 @@ export type SearchResetHandler = () => void;
const performMatch = (
target: string | string[],
query: string,
- options?: UseAsyncSearchOptions
+ options?: UseAsyncSearchOptions,
): string | undefined => {
if (Array.isArray(target)) {
const matchTarget = target.find((i) =>
- matchQuery(normalize(i, options?.normalizeOptions), query, options?.matchOptions)
+ matchQuery(normalize(i, options?.normalizeOptions), query, options?.matchOptions),
);
return matchTarget ? normalize(matchTarget, options?.normalizeOptions) : undefined;
}
@@ -50,7 +50,7 @@ export const orderSearchItems = (
query: string,
items: TSearchItem[],
getItemStr: SearchItemStrGetter,
- options?: UseAsyncSearchOptions
+ options?: UseAsyncSearchOptions,
): TSearchItem[] => {
const orderedItems: TSearchItem[] = Array.from(items);
@@ -107,7 +107,7 @@ export const orderSearchItems = (
export const useAsyncSearch = (
list: TSearchItem[],
getItemStr: SearchItemStrGetter,
- options?: UseAsyncSearchOptions
+ options?: UseAsyncSearchOptions,
): [UseAsyncSearchResult | undefined, AsyncSearchHandler, SearchResetHandler] => {
const [result, setResult] = useState>();
@@ -135,7 +135,7 @@ export const useAsyncSearch = (
const normalizedQuery = normalize(query, options?.normalizeOptions);
searchCallback(normalizedQuery);
},
- [searchCallback, options?.normalizeOptions]
+ [searchCallback, options?.normalizeOptions],
);
const resetHandler: SearchResetHandler = useCallback(() => {
@@ -148,7 +148,7 @@ export const useAsyncSearch = (
// terminate any ongoing search request on unmount.
terminateSearch();
},
- [terminateSearch]
+ [terminateSearch],
);
return [result, searchHandler, resetHandler];
diff --git a/src/app/hooks/useCall.ts b/src/app/hooks/useCall.ts
index 1364e4598..139ed90e2 100644
--- a/src/app/hooks/useCall.ts
+++ b/src/app/hooks/useCall.ts
@@ -35,7 +35,7 @@ export const useCallSession = (room: Room): MatrixRTCSession => {
export const useCallMembers = (room: Room, session: MatrixRTCSession): CallMembership[] => {
const [memberships, setMemberships] = useState(
- MatrixRTCSession.sessionMembershipsForRoom(room, session.sessionDescription)
+ MatrixRTCSession.sessionMembershipsForRoom(room, session.sessionDescription),
);
useEffect(() => {
diff --git a/src/app/hooks/useCallEmbed.ts b/src/app/hooks/useCallEmbed.ts
index 1aac656ae..316aa5c9a 100644
--- a/src/app/hooks/useCallEmbed.ts
+++ b/src/app/hooks/useCallEmbed.ts
@@ -46,14 +46,14 @@ export const createCallEmbed = (
container: HTMLElement,
pref?: CallPreferences,
noiseSuppression = true,
- forceAudioOff = false
+ forceAudioOff = false,
): CallEmbed => {
const rtcSession = mx.matrixRTC.getRoomSession(room);
const ongoing =
MatrixRTCSession.sessionMembershipsForRoom(room, rtcSession.sessionDescription).length > 0;
const intent = CallEmbed.getIntent(dm, ongoing, pref?.video);
- const initialAudio = forceAudioOff ? false : pref?.microphone ?? true;
+ const initialAudio = forceAudioOff ? false : (pref?.microphone ?? true);
const initialVideo = pref?.video ?? false;
const widget = CallEmbed.getWidget(
mx,
@@ -62,7 +62,7 @@ export const createCallEmbed = (
themeKind,
noiseSuppression,
initialAudio,
- initialVideo
+ initialVideo,
);
const controlState =
pref && new CallControlState(forceAudioOff ? false : pref.microphone, pref.video, pref.sound);
@@ -94,12 +94,12 @@ export const useCallStart = (dm = false) => {
container,
pref,
callNoiseSuppression ?? true,
- !!pttMode
+ !!pttMode,
);
setCallEmbed(callEmbed);
},
- [mx, dm, theme, setCallEmbed, callEmbedRef, callNoiseSuppression, pttMode]
+ [mx, dm, theme, setCallEmbed, callEmbedRef, callNoiseSuppression, pttMode],
);
return startCall;
@@ -113,7 +113,7 @@ export const useCallJoined = (embed?: CallEmbed): boolean => {
ElementWidgetActions.JoinCall,
useCallback(() => {
setJoined(true);
- }, [])
+ }, []),
);
useEffect(() => {
@@ -134,7 +134,7 @@ export const useCallMemberSoundSync = (embed: CallEmbed) => {
const callSession = useCallSession(embed.room);
useCallMembersChange(
callSession,
- useCallback(() => embed.control.applySound(), [embed])
+ useCallback(() => embed.control.applySound(), [embed]),
);
};
@@ -164,6 +164,6 @@ export const useCallEmbedPlacementSync = (containerViewRef: RefObject containerViewRef.current, [containerViewRef])
+ useCallback(() => containerViewRef.current, [containerViewRef]),
);
};
diff --git a/src/app/hooks/useCallSpeakers.ts b/src/app/hooks/useCallSpeakers.ts
index 240036785..7843dc3b5 100644
--- a/src/app/hooks/useCallSpeakers.ts
+++ b/src/app/hooks/useCallSpeakers.ts
@@ -39,8 +39,8 @@ export const useCallSpeakers = (callEmbed: CallEmbed): Set => {
setSpeakers(s);
},
- [callEmbed]
- )
+ [callEmbed],
+ ),
);
useEffect(() => {
diff --git a/src/app/hooks/useCategoryHandler.ts b/src/app/hooks/useCategoryHandler.ts
index 086902d63..e2143df9b 100644
--- a/src/app/hooks/useCategoryHandler.ts
+++ b/src/app/hooks/useCategoryHandler.ts
@@ -11,7 +11,7 @@ type CategoryAction =
};
export const useCategoryHandler = (
setAtom: (action: CategoryAction) => void,
- closed: (categoryId: string) => boolean
+ closed: (categoryId: string) => boolean,
) => {
const handleCategoryClick: MouseEventHandler = (evt) => {
const categoryId = evt.currentTarget.getAttribute('data-category-id');
diff --git a/src/app/hooks/useCommands.ts b/src/app/hooks/useCommands.ts
index 4f6f951b6..19aa4c0b6 100644
--- a/src/app/hooks/useCommands.ts
+++ b/src/app/hooks/useCommands.ts
@@ -230,7 +230,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
exe: async (payload) => {
const rawIds = splitWithSpace(payload);
const roomIdOrAliases = rawIds.filter(
- (idOrAlias) => isRoomId(idOrAlias) || isRoomAlias(idOrAlias)
+ (idOrAlias) => isRoomId(idOrAlias) || isRoomAlias(idOrAlias),
);
await Promise.all(roomIdOrAliases.map((idOrAlias) => mx.joinRoom(idOrAlias)));
},
@@ -369,7 +369,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
...content,
displayname: nick,
},
- mx.getSafeUserId()
+ mx.getSafeUserId(),
);
},
},
@@ -391,7 +391,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
...content,
avatar_url: payload,
},
- mx.getSafeUserId()
+ mx.getSafeUserId(),
);
}
},
@@ -442,7 +442,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
const startEventId = result.event_id;
const path = `/rooms/${encodeURIComponent(room.roomId)}/context/${encodeURIComponent(
- startEventId
+ startEventId,
)}`;
const eventContext = await mx.http.authedRequest(Method.Get, path, {
limit: 0,
@@ -456,7 +456,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
token,
20,
Direction.Forward,
- undefined
+ undefined,
);
const { end, chunk } = response;
// remove until the latest event;
@@ -466,14 +466,14 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
(roomEvent) =>
(messageTypes.length > 0 ? messageTypes.includes(roomEvent.type) : true) &&
users.includes(roomEvent.sender) &&
- roomEvent.unsigned?.redacted_because === undefined
+ roomEvent.unsigned?.redacted_because === undefined,
);
const eventIds = eventsToDelete.map((roomEvent) => roomEvent.event_id);
// eslint-disable-next-line no-await-in-loop
await rateLimitedActions(eventIds, (eventId) =>
- mx.redactEvent(room.roomId, eventId, undefined, { reason })
+ mx.redactEvent(room.roomId, eventId, undefined, { reason }),
);
}
},
@@ -498,7 +498,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
const serverAcl = getStateEvent(
room,
- StateEvent.RoomServerAcl
+ StateEvent.RoomServerAcl,
)?.getContent();
const aclContent: RoomServerAclEventContent = {
@@ -517,10 +517,10 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
});
aclContent.allow = aclContent.allow?.filter(
- (servername) => !removeAllowList.includes(servername)
+ (servername) => !removeAllowList.includes(servername),
);
aclContent.deny = aclContent.deny?.filter(
- (servername) => !removeDenyList.includes(servername)
+ (servername) => !removeDenyList.includes(servername),
);
aclContent.allow?.sort();
@@ -530,7 +530,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
},
},
}),
- [mx, room, navigateRoom]
+ [mx, room, navigateRoom],
);
return commands;
diff --git a/src/app/hooks/useComposingCheck.ts b/src/app/hooks/useComposingCheck.ts
index 6a6932da0..d2cdec6e9 100644
--- a/src/app/hooks/useComposingCheck.ts
+++ b/src/app/hooks/useComposingCheck.ts
@@ -13,7 +13,7 @@ export function useCompositionEndTracking(): void {
(evt: TimeStamped) => {
setLastCompositionEnd(evt.timeStamp);
},
- [setLastCompositionEnd]
+ [setLastCompositionEnd],
);
useEffect(() => {
@@ -42,6 +42,6 @@ export function useComposingCheck({
(evt.keyCode === 229 &&
typeof compositionEnd !== 'undefined' &&
evt.timeStamp - compositionEnd < compositionEndThreshold),
- [compositionEndThreshold, compositionEnd]
+ [compositionEndThreshold, compositionEnd],
);
}
diff --git a/src/app/hooks/useDateFormat.ts b/src/app/hooks/useDateFormat.ts
index d29211400..17b5990cc 100644
--- a/src/app/hooks/useDateFormat.ts
+++ b/src/app/hooks/useDateFormat.ts
@@ -34,5 +34,5 @@ export const useDateFormatItems = (): DateFormatItem[] =>
name: 'Custom',
},
],
- []
+ [],
);
diff --git a/src/app/hooks/useDebounce.ts b/src/app/hooks/useDebounce.ts
index 5f33976a3..df48f3d2d 100644
--- a/src/app/hooks/useDebounce.ts
+++ b/src/app/hooks/useDebounce.ts
@@ -8,7 +8,7 @@ export type DebounceCallback = (...args: T) => void;
export function useDebounce(
callback: DebounceCallback,
- options?: DebounceOptions
+ options?: DebounceOptions,
): DebounceCallback {
const timeoutIdRef = useRef();
const { wait, immediate } = options ?? {};
@@ -27,7 +27,7 @@ export function useDebounce(
timeoutIdRef.current = undefined;
}, wait);
},
- [callback, wait, immediate]
+ [callback, wait, immediate],
);
return debounceCallback;
diff --git a/src/app/hooks/useDeviceList.ts b/src/app/hooks/useDeviceList.ts
index f89cb3d98..a31621043 100644
--- a/src/app/hooks/useDeviceList.ts
+++ b/src/app/hooks/useDeviceList.ts
@@ -5,7 +5,7 @@ import { CryptoEvent, CryptoEventHandlerMap } from 'matrix-js-sdk/lib/crypto-api
import { useMatrixClient } from './useMatrixClient';
export const useDeviceListChange = (
- onChange: CryptoEventHandlerMap[CryptoEvent.DevicesUpdated]
+ onChange: CryptoEventHandlerMap[CryptoEvent.DevicesUpdated],
) => {
const mx = useMatrixClient();
useEffect(() => {
@@ -46,8 +46,8 @@ export function useDeviceList(): [undefined | IMyDevice[], () => Promise]
refreshDeviceList();
}
},
- [mx, refreshDeviceList]
- )
+ [mx, refreshDeviceList],
+ ),
);
return [deviceList ?? undefined, refreshDeviceList];
@@ -60,17 +60,17 @@ export const useDeviceIds = (devices: IMyDevice[] | undefined): string[] => {
};
export const useSplitCurrentDevice = (
- devices: IMyDevice[] | undefined
+ devices: IMyDevice[] | undefined,
): [IMyDevice | undefined, IMyDevice[] | undefined] => {
const mx = useMatrixClient();
const currentDeviceId = mx.getDeviceId();
const currentDevice = useMemo(
() => devices?.find((d) => d.device_id === currentDeviceId),
- [devices, currentDeviceId]
+ [devices, currentDeviceId],
);
const otherDevices = useMemo(
() => devices?.filter((device) => device.device_id !== currentDeviceId),
- [devices, currentDeviceId]
+ [devices, currentDeviceId],
);
return [currentDevice, otherDevices];
diff --git a/src/app/hooks/useDeviceVerificationStatus.ts b/src/app/hooks/useDeviceVerificationStatus.ts
index 9e723bd75..01011b4f6 100644
--- a/src/app/hooks/useDeviceVerificationStatus.ts
+++ b/src/app/hooks/useDeviceVerificationStatus.ts
@@ -17,7 +17,7 @@ export const useDeviceVerificationDetect = (
crypto: CryptoApi | undefined,
userId: string,
deviceId: string | undefined,
- callback: (status: VerificationStatus) => void
+ callback: (status: VerificationStatus) => void,
): void => {
const mx = useMatrixClient();
@@ -45,15 +45,15 @@ export const useDeviceVerificationDetect = (
updateStatus();
}
},
- [userId, updateStatus]
- )
+ [userId, updateStatus],
+ ),
);
};
export const useDeviceVerificationStatus = (
crypto: CryptoApi | undefined,
userId: string,
- deviceId: string | undefined
+ deviceId: string | undefined,
): VerificationStatus => {
const [verificationStatus, setVerificationStatus] = useState(VerificationStatus.Unknown);
@@ -65,7 +65,7 @@ export const useDeviceVerificationStatus = (
export const useUnverifiedDeviceCount = (
crypto: CryptoApi | undefined,
userId: string,
- devices: string[]
+ devices: string[],
): number | undefined => {
const [unverifiedCount, setUnverifiedCount] = useState();
const alive = useAlive();
@@ -94,8 +94,8 @@ export const useUnverifiedDeviceCount = (
updateCount();
}
},
- [userId, updateCount]
- )
+ [userId, updateCount],
+ ),
);
useEffect(() => {
diff --git a/src/app/hooks/useElementSizeObserver.ts b/src/app/hooks/useElementSizeObserver.ts
index da563c102..d70f2f858 100644
--- a/src/app/hooks/useElementSizeObserver.ts
+++ b/src/app/hooks/useElementSizeObserver.ts
@@ -3,7 +3,7 @@ import { getResizeObserverEntry, useResizeObserver } from './useResizeObserver';
export const useElementSizeObserver = (
element: () => T | null,
- onResize: (width: number, height: number, element: T) => void
+ onResize: (width: number, height: number, element: T) => void,
) => {
useResizeObserver(
useCallback(
@@ -16,8 +16,8 @@ export const useElementSizeObserver = (
onResize(clientWidth, clientHeight, target);
}
},
- [element, onResize]
+ [element, onResize],
),
- element
+ element,
);
};
diff --git a/src/app/hooks/useEmailNotifications.ts b/src/app/hooks/useEmailNotifications.ts
index 58639394b..e9cf7df13 100644
--- a/src/app/hooks/useEmailNotifications.ts
+++ b/src/app/hooks/useEmailNotifications.ts
@@ -11,7 +11,7 @@ type EmailNotificationResult = {
export const useEmailNotifications = (): [
EmailNotificationResult | undefined | null,
- RefreshHandler
+ RefreshHandler,
] => {
const mx = useMatrixClient();
@@ -26,7 +26,7 @@ export const useEmailNotifications = (): [
const pushers = (await mx.getPushers())?.pushers;
const emailPusher = pushers.find(
- (pusher) => pusher.app_id === 'm.email' && emailAddresses.includes(pusher.pushkey)
+ (pusher) => pusher.app_id === 'm.email' && emailAddresses.includes(pusher.pushkey),
);
if (emailPusher?.pushkey) {
@@ -40,7 +40,7 @@ export const useEmailNotifications = (): [
enabled: false,
email: emailAddresses[0],
};
- }, [mx])
+ }, [mx]),
);
if (emailState.status === AsyncStatus.Success) {
diff --git a/src/app/hooks/useFileDrop.ts b/src/app/hooks/useFileDrop.ts
index bead203f9..61876cf33 100644
--- a/src/app/hooks/useFileDrop.ts
+++ b/src/app/hooks/useFileDrop.ts
@@ -7,12 +7,12 @@ export const useFileDropHandler = (onDrop: (file: File[]) => void): DragEventHan
const files = getDataTransferFiles(evt.dataTransfer);
if (files) onDrop(files);
},
- [onDrop]
+ [onDrop],
);
export const useFileDropZone = (
zoneRef: RefObject,
- onDrop: (file: File[]) => void
+ onDrop: (file: File[]) => void,
): boolean => {
const dragStateRef = useRef<'start' | 'leave' | 'over'>();
const [active, setActive] = useState(false);
diff --git a/src/app/hooks/useFilePasteHandler.ts b/src/app/hooks/useFilePasteHandler.ts
index 0f63b7505..867262f49 100644
--- a/src/app/hooks/useFilePasteHandler.ts
+++ b/src/app/hooks/useFilePasteHandler.ts
@@ -7,5 +7,5 @@ export const useFilePasteHandler = (onPaste: (file: File[]) => void): ClipboardE
const files = getDataTransferFiles(evt.clipboardData);
if (files) onPaste(files);
},
- [onPaste]
+ [onPaste],
);
diff --git a/src/app/hooks/useFilePicker.ts b/src/app/hooks/useFilePicker.ts
index e772d6609..43be2def9 100644
--- a/src/app/hooks/useFilePicker.ts
+++ b/src/app/hooks/useFilePicker.ts
@@ -3,7 +3,7 @@ import { selectFile } from '../utils/dom';
export const useFilePicker = (
onSelect: (file: M extends true ? File[] : File) => void,
- multiple?: M
+ multiple?: M,
) =>
useCallback(
async (accept: string) => {
@@ -11,5 +11,5 @@ export const useFilePicker = (
if (!file) return;
onSelect(file);
},
- [multiple, onSelect]
+ [multiple, onSelect],
);
diff --git a/src/app/hooks/useGetRoom.ts b/src/app/hooks/useGetRoom.ts
index 05fcf8d3d..0f78e48b2 100644
--- a/src/app/hooks/useGetRoom.ts
+++ b/src/app/hooks/useGetRoom.ts
@@ -22,7 +22,7 @@ export const useGetRoom = (rooms: Set): GetRoomCallback => {
}
return undefined;
},
- [mx, rooms]
+ [mx, rooms],
);
return getRoom;
diff --git a/src/app/hooks/useImagePackRooms.ts b/src/app/hooks/useImagePackRooms.ts
index f04d2f222..5b1ea74b1 100644
--- a/src/app/hooks/useImagePackRooms.ts
+++ b/src/app/hooks/useImagePackRooms.ts
@@ -5,7 +5,7 @@ import { useMatrixClient } from './useMatrixClient';
export const useImagePackRooms = (
roomId: string,
- roomToParents: Map>
+ roomToParents: Map>,
): Room[] => {
const mx = useMatrixClient();
diff --git a/src/app/hooks/useImagePacks.ts b/src/app/hooks/useImagePacks.ts
index 318d6cbaf..000f612fd 100644
--- a/src/app/hooks/useImagePacks.ts
+++ b/src/app/hooks/useImagePacks.ts
@@ -26,8 +26,8 @@ export const useUserImagePack = (): ImagePack | undefined => {
setUserPack(getUserImagePack(mx));
}
},
- [mx]
- )
+ [mx],
+ ),
);
return userPack;
@@ -45,8 +45,8 @@ export const useGlobalImagePacks = (): ImagePack[] => {
setGlobalPacks(getGlobalImagePacks(mx));
}
},
- [mx]
- )
+ [mx],
+ ),
);
useStateEventCallback(
@@ -59,15 +59,15 @@ export const useGlobalImagePacks = (): ImagePack[] => {
if (eventType === StateEvent.PoniesRoomEmotes && roomId && typeof stateKey === 'string') {
const global = !!globalPacks.find(
(pack) =>
- pack.address && pack.address.roomId === roomId && pack.address.stateKey === stateKey
+ pack.address && pack.address.roomId === roomId && pack.address.stateKey === stateKey,
);
if (global) {
setGlobalPacks(getGlobalImagePacks(mx));
}
}
},
- [mx, globalPacks]
- )
+ [mx, globalPacks],
+ ),
);
return globalPacks;
@@ -89,8 +89,8 @@ export const useRoomImagePack = (room: Room, stateKey: string): ImagePack | unde
setRoomPack(getRoomImagePack(room, stateKey));
}
},
- [room, stateKey]
- )
+ [room, stateKey],
+ ),
);
return roomPack;
@@ -111,8 +111,8 @@ export const useRoomImagePacks = (room: Room): ImagePack[] => {
setRoomPacks(getRoomImagePacks(room));
}
},
- [room]
- )
+ [room],
+ ),
);
return roomPacks;
@@ -133,8 +133,8 @@ export const useRoomsImagePacks = (rooms: Room[]) => {
setRoomPacks(rooms.flatMap(getRoomImagePacks));
}
},
- [rooms]
- )
+ [rooms],
+ ),
);
return roomPacks;
@@ -151,7 +151,7 @@ export const useRelevantImagePacks = (usage: ImageUsage, rooms: Room[]): ImagePa
const relPacks = packs.concat(
globalPacks,
- roomsPacks.filter((pack) => !globalPackIds.has(pack.id))
+ roomsPacks.filter((pack) => !globalPackIds.has(pack.id)),
);
return relPacks.filter((pack) => pack.getImages(usage).length > 0);
diff --git a/src/app/hooks/useIntersectionObserver.ts b/src/app/hooks/useIntersectionObserver.ts
index 9b0b50e84..be5d175bc 100644
--- a/src/app/hooks/useIntersectionObserver.ts
+++ b/src/app/hooks/useIntersectionObserver.ts
@@ -10,13 +10,13 @@ export type IntersectionObserverOpts = {
export const getIntersectionObserverEntry = (
target: Element | Document,
- entries: IntersectionObserverEntry[]
+ entries: IntersectionObserverEntry[],
): IntersectionObserverEntry | undefined => entries.find((entry) => entry.target === target);
export const useIntersectionObserver = (
onIntersectionCallback: OnIntersectionCallback,
opts?: IntersectionObserverOpts | (() => IntersectionObserverOpts),
- observeElement?: Element | null | (() => Element | null)
+ observeElement?: Element | null | (() => Element | null),
): IntersectionObserver | undefined => {
const [intersectionObserver, setIntersectionObserver] = useState();
diff --git a/src/app/hooks/useKeyBackup.ts b/src/app/hooks/useKeyBackup.ts
index e736e8ddf..7ea12e5e2 100644
--- a/src/app/hooks/useKeyBackup.ts
+++ b/src/app/hooks/useKeyBackup.ts
@@ -10,7 +10,7 @@ import { useMatrixClient } from './useMatrixClient';
import { useAlive } from './useAlive';
export const useKeyBackupStatusChange = (
- onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupStatus]
+ onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupStatus],
) => {
const mx = useMatrixClient();
@@ -40,7 +40,7 @@ export const useKeyBackupStatus = (crypto: CryptoApi): boolean => {
};
export const useKeyBackupSessionsRemainingChange = (
- onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupSessionsRemaining]
+ onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupSessionsRemaining],
) => {
const mx = useMatrixClient();
@@ -53,7 +53,7 @@ export const useKeyBackupSessionsRemainingChange = (
};
export const useKeyBackupFailedChange = (
- onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupFailed]
+ onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupFailed],
) => {
const mx = useMatrixClient();
@@ -66,7 +66,7 @@ export const useKeyBackupFailedChange = (
};
export const useKeyBackupDecryptionKeyCached = (
- onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupDecryptionKeyCached]
+ onChange: CryptoEventHandlerMap[CryptoEvent.KeyBackupDecryptionKeyCached],
) => {
const mx = useMatrixClient();
@@ -86,7 +86,7 @@ export const useKeyBackupSync = (): [number, string | undefined] => {
useCallback((count) => {
setRemaining(count);
setFailure(undefined);
- }, [])
+ }, []),
);
useKeyBackupFailedChange(
@@ -95,7 +95,7 @@ export const useKeyBackupSync = (): [number, string | undefined] => {
setFailure(f);
setRemaining(0);
}
- }, [])
+ }, []),
);
return [remaining, failure];
@@ -126,8 +126,8 @@ export const useKeyBackupInfo = (crypto: CryptoApi): KeyBackupInfo | undefined |
fetchInfo();
}
},
- [fetchInfo]
- )
+ [fetchInfo],
+ ),
);
return info;
@@ -135,7 +135,7 @@ export const useKeyBackupInfo = (crypto: CryptoApi): KeyBackupInfo | undefined |
export const useKeyBackupTrust = (
crypto: CryptoApi,
- backupInfo: KeyBackupInfo
+ backupInfo: KeyBackupInfo,
): BackupTrustInfo | undefined => {
const alive = useAlive();
const [trust, setTrust] = useState();
diff --git a/src/app/hooks/useMatrixEventRenderer.ts b/src/app/hooks/useMatrixEventRenderer.ts
index 57d56cc1c..fcb942b74 100644
--- a/src/app/hooks/useMatrixEventRenderer.ts
+++ b/src/app/hooks/useMatrixEventRenderer.ts
@@ -14,7 +14,7 @@ export const useMatrixEventRenderer =
(
typeToRenderer: EventRendererOpts,
renderStateEvent?: EventRenderer,
- renderEvent?: EventRenderer
+ renderEvent?: EventRenderer,
): RenderMatrixEvent =>
(eventType, isStateEvent, ...args) => {
const renderer = typeToRenderer[eventType];
diff --git a/src/app/hooks/useMemberFilter.ts b/src/app/hooks/useMemberFilter.ts
index 2c33c7c8d..e34ff1213 100644
--- a/src/app/hooks/useMemberFilter.ts
+++ b/src/app/hooks/useMemberFilter.ts
@@ -45,12 +45,12 @@ export const useMembershipFilterMenu = (): MembershipFilterItem[] =>
filterFn: MembershipFilter.filterBanned,
},
],
- []
+ [],
);
export const useMembershipFilter = (
index: number,
- membershipFilter: MembershipFilterItem[]
+ membershipFilter: MembershipFilterItem[],
): MembershipFilterItem => {
const filter = membershipFilter[index] ?? membershipFilter[0];
return filter;
diff --git a/src/app/hooks/useMemberPowerCompare.ts b/src/app/hooks/useMemberPowerCompare.ts
index 72163edfc..f8e25e1a7 100644
--- a/src/app/hooks/useMemberPowerCompare.ts
+++ b/src/app/hooks/useMemberPowerCompare.ts
@@ -19,7 +19,7 @@ export const useMemberPowerCompare = (creators: Set, powerLevels: IPower
return aPower > bPower;
},
- [creators, powerLevels]
+ [creators, powerLevels],
);
return {
diff --git a/src/app/hooks/useMemberPowerTag.ts b/src/app/hooks/useMemberPowerTag.ts
index 31e52aa01..361c58cd2 100644
--- a/src/app/hooks/useMemberPowerTag.ts
+++ b/src/app/hooks/useMemberPowerTag.ts
@@ -12,7 +12,7 @@ export type GetMemberPowerTag = (userId: string) => MemberPowerTag;
export const useGetMemberPowerTag = (
room: Room,
creators: Set,
- powerLevels: IPowerLevels
+ powerLevels: IPowerLevels,
) => {
const creatorsTag = useRoomCreatorsTag();
const powerLevelTags = usePowerLevelTags(room, powerLevels);
@@ -26,7 +26,7 @@ export const useGetMemberPowerTag = (
const power = readPowerLevel.user(powerLevels, userId);
return getPowerLevelTag(powerLevelTags, power);
},
- [creators, creatorsTag, powerLevels, powerLevelTags]
+ [creators, creatorsTag, powerLevels, powerLevelTags],
);
return getMemberPowerTag;
@@ -35,16 +35,16 @@ export const useGetMemberPowerTag = (
export const getPowerTagIconSrc = (
mx: MatrixClient,
useAuthentication: boolean,
- icon: MemberPowerTagIcon
+ icon: MemberPowerTagIcon,
): string | undefined =>
icon?.key?.startsWith('mxc://')
- ? mx.mxcUrlToHttp(icon.key, 96, 96, 'scale', undefined, undefined, useAuthentication) ?? '🌻'
+ ? (mx.mxcUrlToHttp(icon.key, 96, 96, 'scale', undefined, undefined, useAuthentication) ?? '🌻')
: icon?.key;
export const useAccessiblePowerTagColors = (
themeKind: ThemeKind,
creatorsTag: MemberPowerTag,
- powerLevelTags: PowerLevelTags
+ powerLevelTags: PowerLevelTags,
): Map => {
const accessibleColors: Map = useMemo(() => {
const colors: Map = new Map();
@@ -67,7 +67,7 @@ export const useAccessiblePowerTagColors = (
export const useFlattenPowerTagMembers = (
members: RoomMember[],
- getTag: GetMemberPowerTag
+ getTag: GetMemberPowerTag,
): Array => {
const PLTagOrRoomMember = useMemo(() => {
let prevTag: MemberPowerTag | undefined;
diff --git a/src/app/hooks/useMemberSort.ts b/src/app/hooks/useMemberSort.ts
index 48d2f6050..73f5e2f61 100644
--- a/src/app/hooks/useMemberSort.ts
+++ b/src/app/hooks/useMemberSort.ts
@@ -39,7 +39,7 @@ export const useMemberSortMenu = (): MemberSortItem[] =>
sortFn: MemberSort.Oldest,
},
],
- []
+ [],
);
export const useMemberSort = (index: number, memberSort: MemberSortItem[]): MemberSortItem => {
@@ -49,7 +49,7 @@ export const useMemberSort = (index: number, memberSort: MemberSortItem[]): Memb
export const useMemberPowerSort = (
creators: Set,
- getPowerLevel: (userId: string) => number
+ getPowerLevel: (userId: string) => number,
): MemberSortFn => {
const sort: MemberSortFn = useCallback(
(a, b) => {
@@ -61,7 +61,7 @@ export const useMemberPowerSort = (
return getPowerLevel(b.userId) - getPowerLevel(a.userId);
},
- [creators]
+ [creators],
);
return sort;
diff --git a/src/app/hooks/useMembership.ts b/src/app/hooks/useMembership.ts
index dbdd527e2..0124e343d 100644
--- a/src/app/hooks/useMembership.ts
+++ b/src/app/hooks/useMembership.ts
@@ -6,13 +6,13 @@ export const useMembership = (room: Room, userId: string): Membership => {
const member = room.getMember(userId);
const [membership, setMembership] = useState(
- () => (member?.membership as Membership | undefined) ?? Membership.Leave
+ () => (member?.membership as Membership | undefined) ?? Membership.Leave,
);
useEffect(() => {
const handleMembershipChange: RoomMemberEventHandlerMap[RoomMemberEvent.Membership] = (
event,
- m
+ m,
) => {
if (event.getRoomId() === room.roomId && m.userId === userId) {
setMembership((m.membership as Membership | undefined) ?? Membership.Leave);
diff --git a/src/app/hooks/useMentionClickHandler.ts b/src/app/hooks/useMentionClickHandler.ts
index 9dc81d4e3..d86270056 100644
--- a/src/app/hooks/useMentionClickHandler.ts
+++ b/src/app/hooks/useMentionClickHandler.ts
@@ -40,7 +40,7 @@ export const useMentionClickHandler = (roomId: string): ReactEventHandler(path, { viaServers }) : path);
},
- [mx, navigate, navigateRoom, navigateSpace, roomId, space, openProfile]
+ [mx, navigate, navigateRoom, navigateSpace, roomId, space, openProfile],
);
return handleClick;
diff --git a/src/app/hooks/useMessageLayout.ts b/src/app/hooks/useMessageLayout.ts
index 06fb9a5d7..9a124f042 100644
--- a/src/app/hooks/useMessageLayout.ts
+++ b/src/app/hooks/useMessageLayout.ts
@@ -22,5 +22,5 @@ export const useMessageLayoutItems = (): MessageLayoutItem[] =>
name: 'Bubble',
},
],
- []
+ [],
);
diff --git a/src/app/hooks/useMessageSpacing.ts b/src/app/hooks/useMessageSpacing.ts
index 62325b1e1..a4b06d2a5 100644
--- a/src/app/hooks/useMessageSpacing.ts
+++ b/src/app/hooks/useMessageSpacing.ts
@@ -34,5 +34,5 @@ export const useMessageSpacingItems = (): MessageSpacingItem[] =>
name: 'Large',
},
],
- []
+ [],
);
diff --git a/src/app/hooks/useMutationObserver.ts b/src/app/hooks/useMutationObserver.ts
index 5d0ce2ab9..6928c3d91 100644
--- a/src/app/hooks/useMutationObserver.ts
+++ b/src/app/hooks/useMutationObserver.ts
@@ -4,17 +4,17 @@ export type OnMutationCallback = (mutations: MutationRecord[]) => void;
export const getMutationRecord = (
target: Node,
- mutations: MutationRecord[]
+ mutations: MutationRecord[],
): MutationRecord | undefined => mutations.find((mutation) => mutation.target === target);
export const useMutationObserver = (
onMutationCallback: OnMutationCallback,
observeElement?: Node | null | (() => Node | null),
- options?: MutationObserverInit
+ options?: MutationObserverInit,
): MutationObserver => {
const mutationObserver = useMemo(
() => new MutationObserver(onMutationCallback),
- [onMutationCallback]
+ [onMutationCallback],
);
useEffect(() => () => mutationObserver?.disconnect(), [mutationObserver]);
diff --git a/src/app/hooks/useMutualRooms.ts b/src/app/hooks/useMutualRooms.ts
index 28c5060bc..b2e94768e 100644
--- a/src/app/hooks/useMutualRooms.ts
+++ b/src/app/hooks/useMutualRooms.ts
@@ -47,7 +47,7 @@ const fetchAllMutualRooms = async (mx: MatrixClient, userId: string): Promise mutualRooms.add(r));
nextBatch = result.next_batch;
@@ -67,7 +67,7 @@ export const useMutualRooms = (userId: string): AsyncState =>
if (support) return fetchAllMutualRooms(mx, userId);
if (unstableSupport) return mx._unstable_getSharedRooms(userId);
return Promise.resolve([]);
- }, [mx, userId, unstableSupport, support])
+ }, [mx, userId, unstableSupport, support]),
);
return mutualRoomsState;
diff --git a/src/app/hooks/useNotificationMode.ts b/src/app/hooks/useNotificationMode.ts
index df90f6477..de9f039d2 100644
--- a/src/app/hooks/useNotificationMode.ts
+++ b/src/app/hooks/useNotificationMode.ts
@@ -9,10 +9,10 @@ export enum NotificationMode {
export const getNotificationMode = (actions: PushRuleAction[]): NotificationMode => {
const soundTweak = actions.find(
- (action) => typeof action === 'object' && action.set_tweak === TweakName.Sound
+ (action) => typeof action === 'object' && action.set_tweak === TweakName.Sound,
);
const notify = actions.find(
- (action) => typeof action === 'string' && action === PushRuleActionName.Notify
+ (action) => typeof action === 'string' && action === PushRuleActionName.Notify,
);
if (notify && soundTweak) return NotificationMode.NotifyLoud;
@@ -26,7 +26,7 @@ export type NotificationModeOptions = {
};
export const getNotificationModeActions = (
mode: NotificationMode,
- options?: NotificationModeOptions
+ options?: NotificationModeOptions,
): PushRuleAction[] => {
if (mode === NotificationMode.OFF) return [];
@@ -51,11 +51,11 @@ export const getNotificationModeActions = (
export type GetNotificationModeCallback = (mode: NotificationMode) => PushRuleAction[];
export const useNotificationModeActions = (
- options?: NotificationModeOptions
+ options?: NotificationModeOptions,
): GetNotificationModeCallback => {
const getAction: GetNotificationModeCallback = useCallback(
(mode) => getNotificationModeActions(mode, options),
- [options]
+ [options],
);
return getAction;
diff --git a/src/app/hooks/useObjectURL.ts b/src/app/hooks/useObjectURL.ts
index 8c6cf3f1c..836081a31 100644
--- a/src/app/hooks/useObjectURL.ts
+++ b/src/app/hooks/useObjectURL.ts
@@ -10,7 +10,7 @@ export const useObjectURL = (object?: Blob): string | undefined => {
() => () => {
if (url) URL.revokeObjectURL(url);
},
- [url]
+ [url],
);
return url;
diff --git a/src/app/hooks/usePan.ts b/src/app/hooks/usePan.ts
index 5c0734cb7..bef6e9366 100644
--- a/src/app/hooks/usePan.ts
+++ b/src/app/hooks/usePan.ts
@@ -13,7 +13,7 @@ const INITIAL_PAN = {
export const usePan = (active: boolean) => {
const [pan, setPan] = useState(INITIAL_PAN);
const [cursor, setCursor] = useState<'grab' | 'grabbing' | 'initial'>(
- active ? 'grab' : 'initial'
+ active ? 'grab' : 'initial',
);
useEffect(() => {
@@ -61,7 +61,7 @@ export const usePan = (active: boolean) => {
document.removeEventListener('mouseup', handleMouseUp);
// eslint-disable-next-line react-hooks/exhaustive-deps
},
- []
+ [],
);
return {
diff --git a/src/app/hooks/useParsedLoginFlows.ts b/src/app/hooks/useParsedLoginFlows.ts
index 088a514ee..b2333cc1b 100644
--- a/src/app/hooks/useParsedLoginFlows.ts
+++ b/src/app/hooks/useParsedLoginFlows.ts
@@ -25,7 +25,7 @@ export const useParsedLoginFlows = (loginFlows: LoginFlow[]) => {
token: getTokenFlow(loginFlows),
sso: getSSOFlow(loginFlows),
}),
- [loginFlows]
+ [loginFlows],
);
return parsedFlow;
diff --git a/src/app/hooks/usePasswordEmail.ts b/src/app/hooks/usePasswordEmail.ts
index 37e96433f..36dc50d08 100644
--- a/src/app/hooks/usePasswordEmail.ts
+++ b/src/app/hooks/usePasswordEmail.ts
@@ -4,7 +4,7 @@ import { AsyncState, useAsyncCallback } from './useAsyncCallback';
import { RequestEmailTokenCallback, RequestEmailTokenResponse } from './types';
export const usePasswordEmail = (
- mx: MatrixClient
+ mx: MatrixClient,
): [AsyncState, RequestEmailTokenCallback] => {
const sendAttemptRef = useRef(1);
@@ -19,7 +19,7 @@ export const usePasswordEmail = (
result,
};
},
- [mx]
+ [mx],
);
const [passwordEmailState, passwordEmail] = useAsyncCallback<
diff --git a/src/app/hooks/usePowerLevelTags.ts b/src/app/hooks/usePowerLevelTags.ts
index 0a6cca508..829e6ea75 100644
--- a/src/app/hooks/usePowerLevelTags.ts
+++ b/src/app/hooks/usePowerLevelTags.ts
@@ -109,7 +109,7 @@ export const usePowerLevelTags = (room: Room, powerLevels: IPowerLevels): PowerL
export const getPowerLevelTag = (
powerLevelTags: PowerLevelTags,
- powerLevel: number
+ powerLevel: number,
): MemberPowerTag => {
const tag: MemberPowerTag | undefined = powerLevelTags[powerLevel];
return tag ?? generateFallbackTag(powerLevelTags, powerLevel);
diff --git a/src/app/hooks/usePowerLevels.ts b/src/app/hooks/usePowerLevels.ts
index 9b220b88f..866d3256a 100644
--- a/src/app/hooks/usePowerLevels.ts
+++ b/src/app/hooks/usePowerLevels.ts
@@ -69,7 +69,7 @@ export function usePowerLevels(room: Room): IPowerLevels {
const powerLevelsEvent = useStateEvent(room, StateEvent.RoomPowerLevels);
const powerLevels: IPowerLevels = useMemo(
() => getPowersLevelFromMatrixEvent(powerLevelsEvent),
- [powerLevelsEvent]
+ [powerLevelsEvent],
);
return powerLevels;
@@ -114,8 +114,8 @@ export const useRoomsPowerLevels = (rooms: Room[]): Map =>
setRoomToPowerLevels(getRoomsPowerLevels());
}
},
- [rooms, getRoomsPowerLevels]
- )
+ [rooms, getRoomsPowerLevels],
+ ),
);
return roomToPowerLevels;
@@ -171,7 +171,7 @@ export const readPowerLevel: ReadPowerLevelAPI = {
export const useGetMemberPowerLevel = (powerLevels: IPowerLevels) => {
const callback = useCallback(
(userId?: string): number => readPowerLevel.user(powerLevels, userId),
- [powerLevels]
+ [powerLevels],
);
return callback;
@@ -209,7 +209,7 @@ export type PermissionLocation =
export const getPermissionPower = (
powerLevels: IPowerLevels,
- location: PermissionLocation
+ location: PermissionLocation,
): number => {
if ('user' in location) {
return readPowerLevel.user(powerLevels, location.key);
@@ -230,7 +230,7 @@ export const getPermissionPower = (
export const applyPermissionPower = (
powerLevels: IPowerLevels,
location: PermissionLocation,
- power: number
+ power: number,
): IPowerLevels => {
if ('user' in location) {
if (typeof location.key === 'string') {
diff --git a/src/app/hooks/usePushRule.ts b/src/app/hooks/usePushRule.ts
index ec87c2176..2f3e62691 100644
--- a/src/app/hooks/usePushRule.ts
+++ b/src/app/hooks/usePushRule.ts
@@ -20,7 +20,7 @@ export const makePushRuleData = (
conditions?: PushRuleCondition[],
pattern?: string,
enabled?: boolean,
- _default?: boolean
+ _default?: boolean,
): PushRuleData => ({
kind,
pushRule: {
@@ -43,7 +43,7 @@ export const orderedPushRuleKinds: PushRuleKind[] = [
export const getPushRule = (
pushRules: IPushRules,
- ruleId: RuleId | string
+ ruleId: RuleId | string,
): PushRuleData | undefined => {
const { global } = pushRules;
@@ -67,5 +67,5 @@ export const getPushRule = (
export const usePushRule = (
pushRules: IPushRules,
- ruleId: RuleId | string
+ ruleId: RuleId | string,
): PushRuleData | undefined => useMemo(() => getPushRule(pushRules, ruleId), [pushRules, ruleId]);
diff --git a/src/app/hooks/useRegisterEmail.ts b/src/app/hooks/useRegisterEmail.ts
index d29c9e6d1..6bd1d8285 100644
--- a/src/app/hooks/useRegisterEmail.ts
+++ b/src/app/hooks/useRegisterEmail.ts
@@ -4,7 +4,7 @@ import { AsyncState, useAsyncCallback } from './useAsyncCallback';
import { RequestEmailTokenCallback, RequestEmailTokenResponse } from './types';
export const useRegisterEmail = (
- mx: MatrixClient
+ mx: MatrixClient,
): [AsyncState, RequestEmailTokenCallback] => {
const sendAttemptRef = useRef(1);
@@ -19,7 +19,7 @@ export const useRegisterEmail = (
result,
};
},
- [mx]
+ [mx],
);
const [registerEmailState, registerEmail] = useAsyncCallback<
diff --git a/src/app/hooks/useRelations.ts b/src/app/hooks/useRelations.ts
index 51978de51..19364ca62 100644
--- a/src/app/hooks/useRelations.ts
+++ b/src/app/hooks/useRelations.ts
@@ -3,7 +3,7 @@ import { RelationsEvent, type Relations } from 'matrix-js-sdk/lib/models/relatio
export const useRelations = (
relations: Relations,
- getRelations: (relations: Relations) => T
+ getRelations: (relations: Relations) => T,
) => {
const [data, setData] = useState(() => getRelations(relations));
diff --git a/src/app/hooks/useResizeObserver.ts b/src/app/hooks/useResizeObserver.ts
index 707d34871..f18435469 100644
--- a/src/app/hooks/useResizeObserver.ts
+++ b/src/app/hooks/useResizeObserver.ts
@@ -4,12 +4,12 @@ export type OnResizeCallback = (entries: ResizeObserverEntry[]) => void;
export const getResizeObserverEntry = (
target: Element,
- entries: ResizeObserverEntry[]
+ entries: ResizeObserverEntry[],
): ResizeObserverEntry | undefined => entries.find((entry) => entry.target === target);
export const useResizeObserver = (
onResizeCallback: OnResizeCallback,
- observeElement?: Element | null | (() => Element | null)
+ observeElement?: Element | null | (() => Element | null),
): ResizeObserver => {
const resizeObserver = useMemo(() => new ResizeObserver(onResizeCallback), [onResizeCallback]);
diff --git a/src/app/hooks/useRestoreBackupOnVerification.ts b/src/app/hooks/useRestoreBackupOnVerification.ts
index 74497b0a9..627b36dc5 100644
--- a/src/app/hooks/useRestoreBackupOnVerification.ts
+++ b/src/app/hooks/useRestoreBackupOnVerification.ts
@@ -19,6 +19,6 @@ export const useRestoreBackupOnVerification = () => {
setRestoreProgress(progress);
},
});
- }, [mx, setRestoreProgress])
+ }, [mx, setRestoreProgress]),
);
};
diff --git a/src/app/hooks/useRoomAliases.ts b/src/app/hooks/useRoomAliases.ts
index 005ff0b6a..186137967 100644
--- a/src/app/hooks/useRoomAliases.ts
+++ b/src/app/hooks/useRoomAliases.ts
@@ -11,7 +11,7 @@ import { getStateEvent } from '../utils/room';
export const usePublishedAliases = (room: Room): [string | undefined, string[]] => {
const aliasContent = useStateEvent(
room,
- StateEvent.RoomCanonicalAlias
+ StateEvent.RoomCanonicalAlias,
)?.getContent();
const canonicalAlias = aliasContent?.alias;
@@ -38,7 +38,7 @@ export const useSetMainAlias = (room: Room): ((alias: string | undefined) => Pro
async (alias: string | undefined) => {
const content = getStateEvent(
room,
- StateEvent.RoomCanonicalAlias
+ StateEvent.RoomCanonicalAlias,
)?.getContent();
const altAliases: string[] = [];
@@ -58,14 +58,14 @@ export const useSetMainAlias = (room: Room): ((alias: string | undefined) => Pro
await mx.sendStateEvent(room.roomId, StateEvent.RoomCanonicalAlias as any, newContent);
},
- [mx, room]
+ [mx, room],
);
return mainAlias;
};
export const usePublishUnpublishAliases = (
- room: Room
+ room: Room,
): {
publishAliases: (aliases: string[]) => Promise;
unpublishAliases: (aliases: string[]) => Promise;
@@ -75,7 +75,7 @@ export const usePublishUnpublishAliases = (
async (aliases: string[]) => {
const content = getStateEvent(
room,
- StateEvent.RoomCanonicalAlias
+ StateEvent.RoomCanonicalAlias,
)?.getContent();
const altAliases = content?.alt_aliases ?? [];
@@ -92,14 +92,14 @@ export const usePublishUnpublishAliases = (
await mx.sendStateEvent(room.roomId, StateEvent.RoomCanonicalAlias as any, newContent);
},
- [mx, room]
+ [mx, room],
);
const unpublishAliases = useCallback(
async (aliases: string[]) => {
const content = getStateEvent(
room,
- StateEvent.RoomCanonicalAlias
+ StateEvent.RoomCanonicalAlias,
)?.getContent();
const altAliases: string[] = [];
@@ -116,7 +116,7 @@ export const usePublishUnpublishAliases = (
await mx.sendStateEvent(room.roomId, StateEvent.RoomCanonicalAlias as any, newContent);
},
- [mx, room]
+ [mx, room],
);
return {
@@ -126,7 +126,7 @@ export const usePublishUnpublishAliases = (
};
export const useLocalAliases = (
- roomId: string
+ roomId: string,
): {
localAliasesState: AsyncState;
addLocalAlias: (alias: string) => Promise;
@@ -139,7 +139,7 @@ export const useLocalAliases = (
useCallback(async () => {
const content = await mx.getLocalAliases(roomId);
return content.aliases;
- }, [mx, roomId])
+ }, [mx, roomId]),
);
useEffect(() => {
@@ -151,7 +151,7 @@ export const useLocalAliases = (
await mx.createAlias(alias, roomId);
if (alive()) await loadAliases();
},
- [mx, roomId, loadAliases, alive]
+ [mx, roomId, loadAliases, alive],
);
const removeLocalAlias = useCallback(
@@ -159,7 +159,7 @@ export const useLocalAliases = (
await mx.deleteAlias(alias);
if (alive()) await loadAliases();
},
- [mx, loadAliases, alive]
+ [mx, loadAliases, alive],
);
return {
diff --git a/src/app/hooks/useRoomCreators.ts b/src/app/hooks/useRoomCreators.ts
index 269d11afd..c6da0aed7 100644
--- a/src/app/hooks/useRoomCreators.ts
+++ b/src/app/hooks/useRoomCreators.ts
@@ -32,7 +32,7 @@ export const useRoomCreators = (room: Room): Set => {
const creators = useMemo(
() => (createEvent ? getRoomCreators(createEvent) : new Set()),
- [createEvent]
+ [createEvent],
);
return creators;
diff --git a/src/app/hooks/useRoomDirectoryVisibility.ts b/src/app/hooks/useRoomDirectoryVisibility.ts
index 6a6060136..0e93a4001 100644
--- a/src/app/hooks/useRoomDirectoryVisibility.ts
+++ b/src/app/hooks/useRoomDirectoryVisibility.ts
@@ -10,7 +10,7 @@ export const useRoomDirectoryVisibility = (roomId: string) => {
useCallback(async () => {
const v = await mx.getRoomDirectoryVisibility(roomId);
return v.visibility === Visibility.Public;
- }, [mx, roomId])
+ }, [mx, roomId]),
);
useEffect(() => {
@@ -21,11 +21,11 @@ export const useRoomDirectoryVisibility = (roomId: string) => {
async (visibility: boolean) => {
await mx.setRoomDirectoryVisibility(
roomId,
- visibility ? Visibility.Public : Visibility.Private
+ visibility ? Visibility.Public : Visibility.Private,
);
await loadVisibility();
},
- [mx, roomId, loadVisibility]
+ [mx, roomId, loadVisibility],
);
return {
diff --git a/src/app/hooks/useRoomEvent.ts b/src/app/hooks/useRoomEvent.ts
index c2715f1f1..2ed5bfd0a 100644
--- a/src/app/hooks/useRoomEvent.ts
+++ b/src/app/hooks/useRoomEvent.ts
@@ -37,7 +37,7 @@ const useFetchEvent = (room: Room, eventId: string) => {
export const useRoomEvent = (
room: Room,
eventId: string,
- getLocally?: () => MatrixEvent | undefined
+ getLocally?: () => MatrixEvent | undefined,
) => {
const event = useMemo(() => {
if (getLocally) return getLocally();
diff --git a/src/app/hooks/useRoomEventReaders.ts b/src/app/hooks/useRoomEventReaders.ts
index 6222bf92d..fa46b0057 100644
--- a/src/app/hooks/useRoomEventReaders.ts
+++ b/src/app/hooks/useRoomEventReaders.ts
@@ -33,7 +33,7 @@ export const useRoomEventReaders = (room: Room, eventId?: string): string[] => {
const handleLocalEcho: RoomEventHandlerMap[RoomEvent.LocalEchoUpdated] = (
event,
r,
- oldEventId
+ oldEventId,
) => {
// update members on local event id replaced
// with server generated id
diff --git a/src/app/hooks/useRoomNavigate.ts b/src/app/hooks/useRoomNavigate.ts
index b2d7a91a1..0de0fe4f7 100644
--- a/src/app/hooks/useRoomNavigate.ts
+++ b/src/app/hooks/useRoomNavigate.ts
@@ -29,7 +29,7 @@ export const useRoomNavigate = () => {
const roomIdOrAlias = getCanonicalAliasOrRoomId(mx, roomId);
navigate(getSpacePath(roomIdOrAlias));
},
- [mx, navigate]
+ [mx, navigate],
);
const navigateRoom = useCallback(
@@ -50,7 +50,7 @@ export const useRoomNavigate = () => {
navigate(
getSpaceRoomPath(pSpaceIdOrAlias, openSpaceTimeline ? roomId : roomIdOrAlias, eventId),
- opts
+ opts,
);
return;
}
@@ -62,7 +62,7 @@ export const useRoomNavigate = () => {
navigate(getHomeRoomPath(roomIdOrAlias, eventId), opts);
},
- [mx, navigate, spaceSelectedId, roomToParents, mDirects, developerTools]
+ [mx, navigate, spaceSelectedId, roomToParents, mDirects, developerTools],
);
return {
diff --git a/src/app/hooks/useRoomPermissions.ts b/src/app/hooks/useRoomPermissions.ts
index cb6f69a25..de26a5a69 100644
--- a/src/app/hooks/useRoomPermissions.ts
+++ b/src/app/hooks/useRoomPermissions.ts
@@ -15,7 +15,7 @@ export type RoomPermissionsAPI = {
export const getRoomPermissionsAPI = (
creators: Set,
- powerLevels: IPowerLevels
+ powerLevels: IPowerLevels,
): RoomPermissionsAPI => {
const api: RoomPermissionsAPI = {
event: (type, userId) => {
@@ -49,11 +49,11 @@ export const getRoomPermissionsAPI = (
export const useRoomPermissions = (
creators: Set,
- powerLevels: IPowerLevels
+ powerLevels: IPowerLevels,
): RoomPermissionsAPI => {
const api: RoomPermissionsAPI = useMemo(
() => getRoomPermissionsAPI(creators, powerLevels),
- [creators, powerLevels]
+ [creators, powerLevels],
);
return api;
diff --git a/src/app/hooks/useRoomReadPositions.ts b/src/app/hooks/useRoomReadPositions.ts
index 87c28b02b..cda8fd983 100644
--- a/src/app/hooks/useRoomReadPositions.ts
+++ b/src/app/hooks/useRoomReadPositions.ts
@@ -8,7 +8,7 @@ import { reactionOrEditEvent } from '../utils/room';
function nearestRenderableId(
liveEvents: MatrixEvent[],
eventIndex: Map,
- evtId: string
+ evtId: string,
): string | null {
const idx = eventIndex.get(evtId) ?? -1;
if (idx === -1) return null;
diff --git a/src/app/hooks/useRoomTypingMembers.ts b/src/app/hooks/useRoomTypingMembers.ts
index f526cbf16..3b0c3cc37 100644
--- a/src/app/hooks/useRoomTypingMembers.ts
+++ b/src/app/hooks/useRoomTypingMembers.ts
@@ -18,7 +18,7 @@ const equalTypingMembers = (x: TypingReceipt[], y: TypingReceipt[]): boolean =>
export const useRoomTypingMember = (roomId: string) => {
const selector = useCallback(
(roomToTyping: IRoomIdToTypingMembers) => roomToTyping.get(roomId) ?? [],
- [roomId]
+ [roomId],
);
const typing = useAtomValue(selectAtom(roomIdToTypingMembersAtom, selector, equalTypingMembers));
diff --git a/src/app/hooks/useRoomsNotificationPreferences.ts b/src/app/hooks/useRoomsNotificationPreferences.ts
index ceea95f73..7f86c2cd5 100644
--- a/src/app/hooks/useRoomsNotificationPreferences.ts
+++ b/src/app/hooks/useRoomsNotificationPreferences.ts
@@ -19,7 +19,7 @@ export type RoomsNotificationPreferences = {
};
const RoomsNotificationPreferencesContext = createContext(
- null
+ null,
);
export const RoomsNotificationPreferencesProvider = RoomsNotificationPreferencesContext.Provider;
@@ -78,7 +78,7 @@ export enum RoomNotificationMode {
export const getRoomNotificationMode = (
preferences: RoomsNotificationPreferences,
- roomId: string
+ roomId: string,
): RoomNotificationMode => {
if (preferences.mute.has(roomId)) {
return RoomNotificationMode.Mute;
@@ -95,7 +95,7 @@ export const getRoomNotificationMode = (
export const useRoomNotificationPreference = (
preferences: RoomsNotificationPreferences,
- roomId: string
+ roomId: string,
): RoomNotificationMode =>
useMemo(() => getRoomNotificationMode(preferences, roomId), [preferences, roomId]);
@@ -111,7 +111,7 @@ export const setRoomNotificationPreference = async (
mx: MatrixClient,
roomId: string,
mode: RoomNotificationMode,
- previousMode: RoomNotificationMode
+ previousMode: RoomNotificationMode,
): Promise => {
// remove the old preference
if (
@@ -158,8 +158,8 @@ export const useSetRoomNotificationPreference = (roomId: string) => {
useCallback(
(mode: RoomNotificationMode, previousMode: RoomNotificationMode) =>
setRoomNotificationPreference(mx, roomId, mode, previousMode),
- [mx, roomId]
- )
+ [mx, roomId],
+ ),
);
return {
diff --git a/src/app/hooks/useScreenSize.ts b/src/app/hooks/useScreenSize.ts
index 3e64528d6..716d57325 100644
--- a/src/app/hooks/useScreenSize.ts
+++ b/src/app/hooks/useScreenSize.ts
@@ -21,7 +21,7 @@ export const useScreenSize = (): ScreenSize => {
useElementSizeObserver(
useCallback(() => document.body, []),
- useCallback((width) => setSize(getScreenSize(width)), [])
+ useCallback((width) => setSize(getScreenSize(width)), []),
);
return size;
diff --git a/src/app/hooks/useSidebarItems.ts b/src/app/hooks/useSidebarItems.ts
index 16aba225a..a87e6936d 100644
--- a/src/app/hooks/useSidebarItems.ts
+++ b/src/app/hooks/useSidebarItems.ts
@@ -22,7 +22,7 @@ export type InCinnySpacesContent = {
export const parseSidebar = (
mx: MatrixClient,
orphanSpaces: string[],
- content?: InCinnySpacesContent
+ content?: InCinnySpacesContent,
) => {
const sidebar = content?.sidebar ?? content?.shortcut ?? [];
const orphans = new Set(orphanSpaces);
@@ -64,14 +64,14 @@ export const parseSidebar = (
};
export const useSidebarItems = (
- orphanSpaces: string[]
+ orphanSpaces: string[],
): [SidebarItems, Dispatch>] => {
const mx = useMatrixClient();
const [sidebarItems, setSidebarItems] = useState(() => {
const inCinnySpacesContent = getAccountData(
mx,
- AccountDataEvent.CinnySpaces
+ AccountDataEvent.CinnySpaces,
)?.getContent();
return parseSidebar(mx, orphanSpaces, inCinnySpacesContent);
});
@@ -79,7 +79,7 @@ export const useSidebarItems = (
useEffect(() => {
const inCinnySpacesContent = getAccountData(
mx,
- AccountDataEvent.CinnySpaces
+ AccountDataEvent.CinnySpaces,
)?.getContent();
setSidebarItems(parseSidebar(mx, orphanSpaces, inCinnySpacesContent));
}, [mx, orphanSpaces]);
@@ -93,8 +93,8 @@ export const useSidebarItems = (
setSidebarItems(parseSidebar(mx, orphanSpaces, newContent));
}
},
- [mx, orphanSpaces]
- )
+ [mx, orphanSpaces],
+ ),
);
return [sidebarItems, setSidebarItems];
@@ -124,7 +124,7 @@ export const sidebarItemWithout = (items: SidebarItems, roomId: string) => {
export const makeCinnySpacesContent = (
mx: MatrixClient,
- items: SidebarItems
+ items: SidebarItems,
): InCinnySpacesContent => {
const currentInSpaces =
getAccountData(mx, AccountDataEvent.CinnySpaces)?.getContent() ?? {};
diff --git a/src/app/hooks/useSpaceHierarchy.ts b/src/app/hooks/useSpaceHierarchy.ts
index ad34e3f45..190cdb800 100644
--- a/src/app/hooks/useSpaceHierarchy.ts
+++ b/src/app/hooks/useSpaceHierarchy.ts
@@ -38,7 +38,7 @@ const hierarchyItemByOrder: SortFunc = (a, b) =>
const getHierarchySpaces = (
rootSpaceId: string,
getRoom: GetRoomCallback,
- spaceRooms: Set
+ spaceRooms: Set,
): HierarchyItemSpace[] => {
const rootSpaceItem: HierarchyItemSpace = {
roomId: rootSpaceId,
@@ -97,7 +97,7 @@ const getSpaceHierarchy = (
rootSpaceId: string,
spaceRooms: Set,
getRoom: (roomId: string) => Room | undefined,
- closedCategory: (spaceId: string) => boolean
+ closedCategory: (spaceId: string) => boolean,
): SpaceHierarchy[] => {
const spaceItems: HierarchyItemSpace[] = getHierarchySpaces(rootSpaceId, getRoom, spaceRooms);
@@ -138,13 +138,13 @@ export const useSpaceHierarchy = (
spaceId: string,
spaceRooms: Set,
getRoom: (roomId: string) => Room | undefined,
- closedCategory: (spaceId: string) => boolean
+ closedCategory: (spaceId: string) => boolean,
): SpaceHierarchy[] => {
const mx = useMatrixClient();
const roomToParents = useAtomValue(roomToParentsAtom);
const [hierarchyAtom] = useState(() =>
- atom(getSpaceHierarchy(spaceId, spaceRooms, getRoom, closedCategory))
+ atom(getSpaceHierarchy(spaceId, spaceRooms, getRoom, closedCategory)),
);
const [hierarchy, setHierarchy] = useAtom(hierarchyAtom);
@@ -164,8 +164,8 @@ export const useSpaceHierarchy = (
setHierarchy(getSpaceHierarchy(spaceId, spaceRooms, getRoom, closedCategory));
}
},
- [spaceId, roomToParents, setHierarchy, spaceRooms, getRoom, closedCategory]
- )
+ [spaceId, roomToParents, setHierarchy, spaceRooms, getRoom, closedCategory],
+ ),
);
return hierarchy;
@@ -175,7 +175,7 @@ const getSpaceJoinedHierarchy = (
rootSpaceId: string,
getRoom: GetRoomCallback,
excludeRoom: (parentId: string, roomId: string) => boolean,
- sortRoomItems: (parentId: string, items: HierarchyItem[]) => HierarchyItem[]
+ sortRoomItems: (parentId: string, items: HierarchyItem[]) => HierarchyItem[],
): HierarchyItem[] => {
const spaceItems: HierarchyItemSpace[] = getHierarchySpaces(rootSpaceId, getRoom, new Set());
@@ -221,7 +221,7 @@ export const useSpaceJoinedHierarchy = (
spaceId: string,
getRoom: GetRoomCallback,
excludeRoom: (parentId: string, roomId: string) => boolean,
- sortByActivity: (spaceId: string) => boolean
+ sortByActivity: (spaceId: string) => boolean,
): HierarchyItem[] => {
const mx = useMatrixClient();
const roomToParents = useAtomValue(roomToParentsAtom);
@@ -235,11 +235,11 @@ export const useSpaceJoinedHierarchy = (
items.sort(hierarchyItemTs).sort(hierarchyItemByOrder);
return items;
},
- [mx, sortByActivity]
+ [mx, sortByActivity],
);
const [hierarchyAtom] = useState(() =>
- atom(getSpaceJoinedHierarchy(spaceId, getRoom, excludeRoom, sortRoomItems))
+ atom(getSpaceJoinedHierarchy(spaceId, getRoom, excludeRoom, sortRoomItems)),
);
const [hierarchy, setHierarchy] = useAtom(hierarchyAtom);
@@ -259,8 +259,8 @@ export const useSpaceJoinedHierarchy = (
setHierarchy(getSpaceJoinedHierarchy(spaceId, getRoom, excludeRoom, sortRoomItems));
}
},
- [spaceId, roomToParents, setHierarchy, getRoom, excludeRoom, sortRoomItems]
- )
+ [spaceId, roomToParents, setHierarchy, getRoom, excludeRoom, sortRoomItems],
+ ),
);
return hierarchy;
@@ -276,7 +276,7 @@ export type FetchSpaceHierarchyLevelData = {
};
export const useFetchSpaceHierarchyLevel = (
roomId: string,
- enable: boolean
+ enable: boolean,
): FetchSpaceHierarchyLevelData => {
const mx = useMatrixClient();
const pageNoRef = useRef(0);
@@ -287,7 +287,7 @@ export const useFetchSpaceHierarchyLevel = (
string | undefined
> = useCallback(
({ pageParam }) => mx.getRoomHierarchy(roomId, PER_PAGE_COUNT, 1, false, pageParam),
- [roomId, mx]
+ [roomId, mx],
);
const queryResponse = useInfiniteQuery({
diff --git a/src/app/hooks/useStateEvent.ts b/src/app/hooks/useStateEvent.ts
index 7bc66aa2e..0a29962a1 100644
--- a/src/app/hooks/useStateEvent.ts
+++ b/src/app/hooks/useStateEvent.ts
@@ -20,13 +20,13 @@ export const useStateEvent = (room: Room, eventType: StateEvent, stateKey = '')
forceUpdate();
}
},
- [room, eventType, stateKey, forceUpdate]
- )
+ [room, eventType, stateKey, forceUpdate],
+ ),
);
return useMemo(
() => getStateEvent(room, eventType, stateKey),
// eslint-disable-next-line react-hooks/exhaustive-deps
- [room, eventType, stateKey, updateCount]
+ [room, eventType, stateKey, updateCount],
);
};
diff --git a/src/app/hooks/useStateEventCallback.ts b/src/app/hooks/useStateEventCallback.ts
index 85be3aeb1..e378b0446 100644
--- a/src/app/hooks/useStateEventCallback.ts
+++ b/src/app/hooks/useStateEventCallback.ts
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
export type StateEventCallback = (
event: MatrixEvent,
state: RoomState,
- lastStateEvent: MatrixEvent | null
+ lastStateEvent: MatrixEvent | null,
) => void;
export const useStateEventCallback = (mx: MatrixClient, onStateEvent: StateEventCallback) => {
diff --git a/src/app/hooks/useSyncState.ts b/src/app/hooks/useSyncState.ts
index be8a6ef2f..ab488dac6 100644
--- a/src/app/hooks/useSyncState.ts
+++ b/src/app/hooks/useSyncState.ts
@@ -3,7 +3,7 @@ import { useEffect } from 'react';
export const useSyncState = (
mx: MatrixClient | undefined,
- onChange: ClientEventHandlerMap[ClientEvent.Sync]
+ onChange: ClientEventHandlerMap[ClientEvent.Sync],
): void => {
useEffect(() => {
mx?.on(ClientEvent.Sync, onChange);
diff --git a/src/app/hooks/useTextAreaCodeEditor.ts b/src/app/hooks/useTextAreaCodeEditor.ts
index 34c12f28d..030aeda93 100644
--- a/src/app/hooks/useTextAreaCodeEditor.ts
+++ b/src/app/hooks/useTextAreaCodeEditor.ts
@@ -6,7 +6,7 @@ import { GetTarget } from '../plugins/text-area/type';
export const useTextAreaCodeEditor = (
textAreaRef: MutableRefObject,
- intentSpaceCount: number
+ intentSpaceCount: number,
) => {
const getTarget: GetTarget = useCallback(() => {
const target = textAreaRef.current;
diff --git a/src/app/hooks/useTextAreaIntent.ts b/src/app/hooks/useTextAreaIntent.ts
index 113316ec2..ff9256eda 100644
--- a/src/app/hooks/useTextAreaIntent.ts
+++ b/src/app/hooks/useTextAreaIntent.ts
@@ -5,7 +5,7 @@ import { Cursor, Intent, Operations, TextArea } from '../plugins/text-area';
export const useTextAreaIntentHandler = (
textArea: TextArea,
operations: Operations,
- intent: Intent
+ intent: Intent,
) => {
const handler: KeyboardEventHandler = useCallback(
(evt) => {
@@ -51,7 +51,7 @@ export const useTextAreaIntentHandler = (
operations.select(intent.addPreviousLine(cursor));
}
},
- [textArea, operations, intent]
+ [textArea, operations, intent],
);
return handler;
diff --git a/src/app/hooks/useTheme.ts b/src/app/hooks/useTheme.ts
index d7626c979..e1d078577 100644
--- a/src/app/hooks/useTheme.ts
+++ b/src/app/hooks/useTheme.ts
@@ -73,13 +73,13 @@ export const useThemeNames = (): Record =>
[DarkTheme.id]: 'Dark',
[ButterTheme.id]: 'Butter',
}),
- []
+ [],
);
export const useSystemThemeKind = (): ThemeKind => {
const darkModeQueryList = useMemo(() => window.matchMedia('(prefers-color-scheme: dark)'), []);
const [themeKind, setThemeKind] = useState(
- darkModeQueryList.matches ? ThemeKind.Dark : ThemeKind.Light
+ darkModeQueryList.matches ? ThemeKind.Dark : ThemeKind.Light,
);
useEffect(() => {
@@ -112,8 +112,8 @@ export const useActiveTheme = (): Theme => {
const selectedTheme =
systemThemeKind === ThemeKind.Dark
- ? themes.find((theme) => theme.id === darkThemeId) ?? DarkTheme
- : themes.find((theme) => theme.id === lightThemeId) ?? LightTheme;
+ ? (themes.find((theme) => theme.id === darkThemeId) ?? DarkTheme)
+ : (themes.find((theme) => theme.id === lightThemeId) ?? LightTheme);
return selectedTheme;
};
diff --git a/src/app/hooks/useThrottle.ts b/src/app/hooks/useThrottle.ts
index 12b249f29..fd5a878f6 100644
--- a/src/app/hooks/useThrottle.ts
+++ b/src/app/hooks/useThrottle.ts
@@ -9,7 +9,7 @@ export type ThrottleCallback = (...args: T) => void;
export function useThrottle(
callback: ThrottleCallback,
- options?: ThrottleOptions
+ options?: ThrottleOptions,
): ThrottleCallback {
const timeoutIdRef = useRef();
const argsRef = useRef();
@@ -34,7 +34,7 @@ export function useThrottle(
timeoutIdRef.current = undefined;
}, wait);
},
- [callback, wait, immediate]
+ [callback, wait, immediate],
);
return debounceCallback;
diff --git a/src/app/hooks/useTimeoutToggle.ts b/src/app/hooks/useTimeoutToggle.ts
index 7eda99c17..fe06fe6e8 100644
--- a/src/app/hooks/useTimeoutToggle.ts
+++ b/src/app/hooks/useTimeoutToggle.ts
@@ -30,7 +30,7 @@ export function useTimeoutToggle(duration = 1500, initial = false): [boolean, ()
() => () => {
clear();
},
- []
+ [],
);
return [active, trigger];
diff --git a/src/app/hooks/useUIAFlows.ts b/src/app/hooks/useUIAFlows.ts
index 0e6c0ddca..dd94ba414 100644
--- a/src/app/hooks/useUIAFlows.ts
+++ b/src/app/hooks/useUIAFlows.ts
@@ -76,7 +76,7 @@ export const useUIAFlow = (authData: IAuthData, uiaFlow: UIAFlow): UIAFlowInterf
const hasStage = useCallback(
(stageType: string): boolean => uiaFlow.stages.includes(stageType),
- [uiaFlow]
+ [uiaFlow],
);
const getStageInfo = useCallback(
@@ -85,7 +85,7 @@ export const useUIAFlow = (authData: IAuthData, uiaFlow: UIAFlow): UIAFlowInterf
return params[stageType];
},
- [hasStage, params]
+ [hasStage, params],
);
return {
@@ -96,7 +96,7 @@ export const useUIAFlow = (authData: IAuthData, uiaFlow: UIAFlow): UIAFlowInterf
};
export const useUIAMatrixError = (
- error?: MatrixError
+ error?: MatrixError,
): [undefined, undefined] | [IAuthData, undefined] | [undefined, MatrixError] => {
if (!error) return [undefined, undefined];
if (error.httpStatus === 401) return [error.data as IAuthData, undefined];
diff --git a/src/app/hooks/useUserPresence.ts b/src/app/hooks/useUserPresence.ts
index 5137950ed..a4535d34f 100644
--- a/src/app/hooks/useUserPresence.ts
+++ b/src/app/hooks/useUserPresence.ts
@@ -54,5 +54,5 @@ export const usePresenceLabel = (): Record =>
[Presence.Unavailable]: 'Busy',
[Presence.Offline]: 'Away',
}),
- []
+ [],
);
diff --git a/src/app/hooks/useUserProfile.ts b/src/app/hooks/useUserProfile.ts
index c7cb74877..87814ab1e 100644
--- a/src/app/hooks/useUserProfile.ts
+++ b/src/app/hooks/useUserProfile.ts
@@ -36,7 +36,7 @@ export const useUserProfile = (userId: string): UserProfile => {
setProfile({
avatarUrl: info.avatar_url,
displayName: info.displayname,
- })
+ }),
);
user?.on(UserEvent.AvatarUrl, onAvatarChange);
diff --git a/src/app/hooks/useUserTrustStatusChange.ts b/src/app/hooks/useUserTrustStatusChange.ts
index 56a9e385b..01b32f32a 100644
--- a/src/app/hooks/useUserTrustStatusChange.ts
+++ b/src/app/hooks/useUserTrustStatusChange.ts
@@ -3,7 +3,7 @@ import { useEffect } from 'react';
import { useMatrixClient } from './useMatrixClient';
export const useUserTrustStatusChange = (
- onChange: CryptoEventHandlerMap[CryptoEvent.UserTrustStatusChanged]
+ onChange: CryptoEventHandlerMap[CryptoEvent.UserTrustStatusChanged],
) => {
const mx = useMatrixClient();
diff --git a/src/app/hooks/useVerificationRequest.ts b/src/app/hooks/useVerificationRequest.ts
index 5feb52320..f2eecccb1 100644
--- a/src/app/hooks/useVerificationRequest.ts
+++ b/src/app/hooks/useVerificationRequest.ts
@@ -13,7 +13,7 @@ import {
import { useMatrixClient } from './useMatrixClient';
export const useVerificationRequestReceived = (
- onRequest: CryptoEventHandlerMap[CryptoEvent.VerificationRequestReceived]
+ onRequest: CryptoEventHandlerMap[CryptoEvent.VerificationRequestReceived],
) => {
const mx = useMatrixClient();
@@ -27,7 +27,7 @@ export const useVerificationRequestReceived = (
export const useVerificationRequestChange = (
request: VerificationRequest,
- onChange: VerificationRequestEventHandlerMap[VerificationRequestEvent.Change]
+ onChange: VerificationRequestEventHandlerMap[VerificationRequestEvent.Change],
) => {
useEffect(() => {
request.on(VerificationRequestEvent.Change, onChange);
@@ -44,7 +44,7 @@ export const useVerificationRequestPhase = (request: VerificationRequest): Verif
request,
useCallback(() => {
setPhase(request.phase);
- }, [request])
+ }, [request]),
);
return phase;
@@ -52,7 +52,7 @@ export const useVerificationRequestPhase = (request: VerificationRequest): Verif
export const useVerifierCancel = (
verifier: Verifier,
- onCallback: VerifierEventHandlerMap[VerifierEvent.Cancel]
+ onCallback: VerifierEventHandlerMap[VerifierEvent.Cancel],
) => {
useEffect(() => {
verifier.on(VerifierEvent.Cancel, onCallback);
@@ -64,7 +64,7 @@ export const useVerifierCancel = (
export const useVerifierShowSas = (
verifier: Verifier,
- onCallback: VerifierEventHandlerMap[VerifierEvent.ShowSas]
+ onCallback: VerifierEventHandlerMap[VerifierEvent.ShowSas],
) => {
useEffect(() => {
verifier.on(VerifierEvent.ShowSas, onCallback);
@@ -76,7 +76,7 @@ export const useVerifierShowSas = (
export const useVerifierShowReciprocateQr = (
verifier: Verifier,
- onCallback: VerifierEventHandlerMap[VerifierEvent.ShowReciprocateQr]
+ onCallback: VerifierEventHandlerMap[VerifierEvent.ShowReciprocateQr],
) => {
useEffect(() => {
verifier.on(VerifierEvent.ShowReciprocateQr, onCallback);
diff --git a/src/app/hooks/useVirtualPaginator.ts b/src/app/hooks/useVirtualPaginator.ts
index 5ad056a6c..3cb3b6fdc 100644
--- a/src/app/hooks/useVirtualPaginator.ts
+++ b/src/app/hooks/useVirtualPaginator.ts
@@ -78,7 +78,7 @@ const getDropIndex = (
range: ItemRange,
dropDirection: Direction,
getItemElement: (index: number) => HTMLElement | undefined,
- pageThreshold = 1
+ pageThreshold = 1,
): number | undefined => {
const fromBackward = dropDirection === Direction.Backward;
const items = fromBackward ? generateItems(range) : generateItems(range).reverse();
@@ -115,7 +115,7 @@ type RestoreAnchorData = [number | undefined, HTMLElement | undefined];
const getRestoreAnchor = (
range: ItemRange,
getItemElement: (index: number) => HTMLElement | undefined,
- direction: Direction
+ direction: Direction,
): RestoreAnchorData => {
let scrollAnchorEl: HTMLElement | undefined;
const scrollAnchorItem = (
@@ -145,7 +145,7 @@ const getRestoreScrollData = (scrollTop: number, restoreAnchorData: RestoreAncho
const useObserveAnchorHandle = (
intersectionObserver: ReturnType,
- anchorType: Direction
+ anchorType: Direction,
): HandleObserveAnchor =>
useMemo(() => {
let anchor: HTMLElement | null = null;
@@ -160,7 +160,7 @@ const useObserveAnchorHandle = (
}, [intersectionObserver, anchorType]);
export const useVirtualPaginator = (
- options: VirtualPaginatorOptions
+ options: VirtualPaginatorOptions,
): VirtualPaginator => {
const { count, limit, range, onRangeChange, getScrollElement, getItemElement, onEnd } = options;
@@ -224,7 +224,7 @@ export const useVirtualPaginator = (
});
return true;
},
- [getScrollElement]
+ [getScrollElement],
);
const scrollToItem = useCallback