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:
Michael Telatynski 2023-03-29 08:23:54 +01:00 committed by GitHub
parent cefd94859c
commit a47b3eb0ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 158 additions and 121 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React, { useMemo } from "react";
import React, { ReactElement, useMemo } from "react";
import { _t } from "../../../languageHandler";
import { Action } from "../../../dispatcher/actions";
@ -26,6 +26,7 @@ import { SettingLevel } from "../../../settings/SettingLevel";
import dis from "../../../dispatcher/dispatcher";
import { RecheckThemePayload } from "../../../dispatcher/payloads/RecheckThemePayload";
import PosthogTrackers from "../../../PosthogTrackers";
import { NonEmptyArray } from "../../../@types/common";
type Props = {
requestClose: () => void;
@ -86,9 +87,11 @@ const QuickThemeSwitcher: React.FC<Props> = ({ requestClose }) => {
value={selectedTheme}
label={_t("Space selection")}
>
{themeOptions.map((theme) => (
<div key={theme.id}>{theme.name}</div>
))}
{
themeOptions.map((theme) => <div key={theme.id}>{theme.name}</div>) as NonEmptyArray<
ReactElement & { key: string }
>
}
</Dropdown>
</div>
);