mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-25 21:29:01 +03:00
fix fast refresh
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from "react";
|
||||
import { createConfigSection } from "./BaseSection";
|
||||
import { ConfigSection } from "./BaseSection";
|
||||
import type { BaseSectionProps, SectionConfig } from "./BaseSection";
|
||||
import { getSectionConfig } from "@/utils/sectionConfigsUtils";
|
||||
|
||||
@@ -19,17 +19,10 @@ export function ConfigSectionTemplate({
|
||||
[sectionKey, level],
|
||||
);
|
||||
|
||||
const SectionComponent = useMemo(
|
||||
() =>
|
||||
createConfigSection({
|
||||
sectionPath: sectionKey,
|
||||
defaultConfig,
|
||||
}),
|
||||
[sectionKey, defaultConfig],
|
||||
);
|
||||
|
||||
return (
|
||||
<SectionComponent
|
||||
<ConfigSection
|
||||
sectionPath={sectionKey}
|
||||
defaultConfig={defaultConfig}
|
||||
level={level}
|
||||
sectionConfig={sectionConfig ?? defaultConfig}
|
||||
{...rest}
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
// Reusable components for both global and camera-level settings
|
||||
|
||||
export {
|
||||
createConfigSection,
|
||||
ConfigSection,
|
||||
type BaseSectionProps,
|
||||
type SectionConfig,
|
||||
type CreateSectionOptions,
|
||||
type ConfigSectionProps,
|
||||
} from "./BaseSection";
|
||||
export {
|
||||
ConfigSectionTemplate,
|
||||
|
||||
Reference in New Issue
Block a user