Apply strictNullChecks
to src/components/views/elements/*
(#10462
* Apply `strictNullChecks` to `src/components/views/elements/*` * Iterate * Iterate * Iterate * Apply `strictNullChecks` to `src/components/views/elements/*` * Iterate * Iterate * Iterate * Update snapshot
This commit is contained in:
parent
cefd94859c
commit
a47b3eb0ee
24 changed files with 158 additions and 121 deletions
|
@ -14,10 +14,11 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import React, { ReactElement } from "react";
|
||||
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
|
||||
|
||||
import Dropdown from "./Dropdown";
|
||||
import { NonEmptyArray } from "../../../@types/common";
|
||||
|
||||
interface IProps {
|
||||
value: JoinRule;
|
||||
|
@ -45,13 +46,15 @@ const JoinRuleDropdown: React.FC<IProps> = ({
|
|||
<div key={JoinRule.Public} className="mx_JoinRuleDropdown_public">
|
||||
{labelPublic}
|
||||
</div>,
|
||||
];
|
||||
] as NonEmptyArray<ReactElement & { key: string }>;
|
||||
|
||||
if (labelRestricted) {
|
||||
options.unshift(
|
||||
<div key={JoinRule.Restricted} className="mx_JoinRuleDropdown_restricted">
|
||||
{labelRestricted}
|
||||
</div>,
|
||||
(
|
||||
<div key={JoinRule.Restricted} className="mx_JoinRuleDropdown_restricted">
|
||||
{labelRestricted}
|
||||
</div>
|
||||
) as ReactElement & { key: string },
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue