fix: customize song structure

This commit is contained in:
2025-11-17 11:41:53 +01:00
parent 1a8fb9f1b5
commit 0dd9dbcfae
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -13,9 +13,12 @@ import { Platform } from "react-native";
const functionsInstances = {};
const emulatorConfigured = {};
const emulatorHost = Platform.OS === "web" ? "localhost" : "192.168.1.62";
const USE_FUNCTIONS_EMULATOR = false; // Toggle to route functions traffic to the local emulator.
const configureFunctionsEmulator = (instance, regionKey = "us-central1") => {
if (!__DEV__ || !instance?.useEmulator || emulatorConfigured[regionKey]) {
const shouldUseEmulator = USE_FUNCTIONS_EMULATOR && instance?.useEmulator;
if (!shouldUseEmulator || emulatorConfigured[regionKey]) {
return;
}
@@ -25,7 +28,7 @@ const configureFunctionsEmulator = (instance, regionKey = "us-central1") => {
} catch (error) {
console.warn(
`[firebase] Unable to set functions emulator for region ${regionKey}`,
error?.message,
error?.message
);
}
};
@@ -150,7 +150,7 @@ const reorder = (list, from, to) => {
return next;
};
const clamp = (value, min, max) => Math.max(mn, Math.min(max, value));
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
const CustomizeSongStructure = ({ baseStructure = [], onChange }) => {
const [, setTooltip] = useGlobal("_tooltip");