Merge pull request #23940 from overleaf/td-react-18
Upgrade to React 18 GitOrigin-RevId: 9b81936e6eea2bccd97fe5c2c5841f0b946371b8
This commit is contained in:
@@ -15,4 +15,6 @@ const IdeRoot: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default withErrorBoundary(memo(IdeRoot), GenericErrorBoundaryFallback)
|
||||
export default withErrorBoundary(memo(IdeRoot), () => (
|
||||
<GenericErrorBoundaryFallback />
|
||||
))
|
||||
|
||||
+3
-1
@@ -10,7 +10,9 @@ type HorizontalResizeHandleOwnProps = {
|
||||
}
|
||||
|
||||
export const HorizontalResizeHandle: FC<
|
||||
HorizontalResizeHandleOwnProps & PanelResizeHandleProps
|
||||
React.PropsWithChildren<
|
||||
HorizontalResizeHandleOwnProps & PanelResizeHandleProps
|
||||
>
|
||||
> = ({ children, resizable = true, onDoubleClick, ...props }) => {
|
||||
const { t } = useTranslation()
|
||||
const [isDragging, setIsDragging] = useState(false)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ export const UnsavedDocs: FC = () => {
|
||||
useEventListener(
|
||||
'beforeunload',
|
||||
useCallback(
|
||||
event => {
|
||||
(event: BeforeUnloadEvent) => {
|
||||
if (openDocs.hasUnsavedChanges()) {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
|
||||
event.preventDefault()
|
||||
|
||||
Reference in New Issue
Block a user