@authhero/react-admin 0.30.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ export { PromptsList } from "./list";
2
+ export { PromptsEdit } from "./edit";
@@ -0,0 +1,14 @@
1
+ import { useEffect } from "react";
2
+ import { useRedirect, useBasename } from "react-admin";
3
+
4
+ export function PromptsList() {
5
+ const redirect = useRedirect();
6
+ const basename = useBasename();
7
+
8
+ useEffect(() => {
9
+ // For singleton resources, redirect to edit with "prompts" as the ID
10
+ redirect(`${basename}/prompts/prompts`);
11
+ }, [redirect, basename]);
12
+
13
+ return null;
14
+ }