From 4b20d5aa51798f968b9e63a800e31a2cca23d838 Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Thu, 13 Jul 2023 09:27:21 -0400 Subject: [PATCH] feat: add navigate hook to exposed hooks --- packages/core/src/index.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index b4ab9d72..082d698a 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,16 +1,17 @@ import { createElement, useCallback, useEffect, useMemo, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import { currentBackend } from './backend'; import bootstrap from './bootstrap'; +import useEntries from './lib/hooks/useEntries'; +import useFolderSupport from './lib/hooks/useFolderSupport'; +import useHasChildErrors from './lib/hooks/useHasChildErrors'; import useIsMediaAsset from './lib/hooks/useIsMediaAsset'; import useMediaAsset from './lib/hooks/useMediaAsset'; +import useMediaFiles from './lib/hooks/useMediaFiles'; import useMediaInsert from './lib/hooks/useMediaInsert'; import useUUID from './lib/hooks/useUUID'; import Registry from './lib/registry'; -import useEntries from './lib/hooks/useEntries'; -import useHasChildErrors from './lib/hooks/useHasChildErrors'; -import useMediaFiles from './lib/hooks/useMediaFiles'; -import useFolderSupport from './lib/hooks/useFolderSupport'; -import { currentBackend } from './backend'; export * from './backends'; export * from './interface'; @@ -40,6 +41,7 @@ if (typeof window !== 'undefined') { window.useMediaFiles = window.useMediaFiles || useMediaFiles; window.useMediaInsert = window.useMediaInsert || useMediaInsert; window.useUUID = window.useUUID || useUUID; + window.useNavigate = window.useNavigate || useNavigate; } export default CMS;