Update Blueprints.tsx
This commit is contained in:
@@ -26,15 +26,6 @@ export default function SiteBuilderBlueprints() {
|
||||
isBulk: boolean;
|
||||
}>({ isOpen: false, blueprint: null, isBulk: false });
|
||||
|
||||
useEffect(() => {
|
||||
if (activeSite?.id) {
|
||||
loadBlueprints(activeSite.id);
|
||||
} else {
|
||||
setBlueprints([]);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [activeSite?.id]);
|
||||
|
||||
const loadBlueprints = async (siteId: number) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
@@ -47,6 +38,15 @@ export default function SiteBuilderBlueprints() {
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (activeSite?.id) {
|
||||
loadBlueprints(activeSite.id);
|
||||
} else {
|
||||
setBlueprints([]);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [activeSite?.id]);
|
||||
|
||||
const handleOpenPreview = async (blueprintId: number) => {
|
||||
try {
|
||||
await loadBlueprint(blueprintId);
|
||||
|
||||
Reference in New Issue
Block a user