mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-15 02:54:07 +00:00
update to react 18
We were stuck on react 16.x for a long time but dependencies seem to have caught up enough that migration is trivial now.
This commit is contained in:
committed by
David Lechner
parent
ca63d048aa
commit
bf4670b25d
+3
-3
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2020-2022 The Pybricks Authors
|
||||
// Copyright (c) 2020-2023 The Pybricks Authors
|
||||
|
||||
import 'react-splitter-layout/lib/index.css';
|
||||
import './app.scss';
|
||||
@@ -46,7 +46,7 @@ const Terminal = React.lazy(async () => {
|
||||
return componentModule;
|
||||
});
|
||||
|
||||
const Docs: React.VFC = () => {
|
||||
const Docs: React.FunctionComponent = () => {
|
||||
const { setIsSettingShowDocsEnabled } = useSettingIsShowDocsEnabled();
|
||||
const { initialDocsPage, setLastDocsPage } = useAppLastDocsPageSetting();
|
||||
|
||||
@@ -153,7 +153,7 @@ const Docs: React.VFC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const App: React.VFC = () => {
|
||||
const App: React.FunctionComponent = () => {
|
||||
const i18n = useI18n();
|
||||
const { isDarkMode } = useTernaryDarkMode();
|
||||
const { isSettingShowDocsEnabled } = useSettingIsShowDocsEnabled();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2022 The Pybricks Authors
|
||||
// Copyright (c) 2022-2023 The Pybricks Authors
|
||||
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import React from 'react';
|
||||
import type { CreateToast } from '../../toasterTypes';
|
||||
import { useI18n } from './i18n';
|
||||
|
||||
const UpdateServerFailure: React.VoidFunctionComponent = () => {
|
||||
const UpdateServerFailure: React.FunctionComponent = () => {
|
||||
const i18n = useI18n();
|
||||
return <p>{i18n.translate('updateServerFailure.message')}</p>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user