Skip to content

Commit 492f622

Browse files
committed
address comments
1 parent 6306fc5 commit 492f622

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

web/lib/opal/src/icons/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ export { default as SvgExpand } from "@opal/icons/expand";
6868
export { default as SvgExternalLink } from "@opal/icons/external-link";
6969
export { default as SvgEye } from "@opal/icons/eye";
7070
export { default as SvgEyeClosed } from "@opal/icons/eye-closed";
71-
<<<<<<< HEAD
7271
export { default as SvgEyeOff } from "@opal/icons/eye-off";
73-
export { default as SvgFiles } from "@opal/icons/files";
74-
=======
75-
>>>>>>> 80f454800 (feat(hook): Add frontend feature control and admin hook page)
7672
export { default as SvgFileBraces } from "@opal/icons/file-braces";
7773
export { default as SvgFileBroadcast } from "@opal/icons/file-broadcast";
7874
export { default as SvgFiles } from "@opal/icons/files";

web/src/hooks/useHookSpecs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import useSWR from "swr";
44
import { errorHandlingFetcher } from "@/lib/fetcher";
5-
import { HookPointMeta } from "@/app/admin/hooks/interfaces";
5+
import { HookPointMeta } from "@/refresh-pages/admin/HooksPage/interfaces";
66

77
export function useHookSpecs() {
88
const { data, isLoading, error } = useSWR<HookPointMeta[]>(

web/src/refresh-components/inputs/InputSearch.stories.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ export const WithValue: Story = {
4848
};
4949

5050
export const Disabled: Story = {
51-
render: () => (
52-
<InputSearch
53-
placeholder="Search..."
54-
value=""
55-
onChange={() => {}}
56-
disabled
57-
/>
58-
),
51+
render: function DisabledStory() {
52+
return (
53+
<InputSearch
54+
placeholder="Search..."
55+
value=""
56+
onChange={() => {}}
57+
disabled
58+
/>
59+
);
60+
},
5961
};

web/src/refresh-pages/admin/HooksPage/HooksContent.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ export default function HooksContent() {
4343
return <SimpleLoader />;
4444
}
4545

46+
if (error) {
47+
return (
48+
<Text text03 secondaryBody>
49+
Failed to load hook specifications. Please refresh the page.
50+
</Text>
51+
);
52+
}
53+
4654
const filtered = (specs ?? []).filter(
4755
(spec) =>
4856
spec.display_name.toLowerCase().includes(search.toLowerCase()) ||

web/src/refresh-pages/admin/HooksPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function HooksPage() {
1717

1818
useEffect(() => {
1919
if (!settingsLoading && !settings.hooks_enabled) {
20-
toast.error("This page needs to be enabled");
20+
toast.info("Hook Extensions are not enabled for this deployment.");
2121
router.replace("/");
2222
}
2323
}, [settingsLoading, settings.hooks_enabled, router]);
File renamed without changes.

0 commit comments

Comments
 (0)