fix: syntax, lint.

This commit is contained in:
Darshan
2025-11-06 19:40:13 +05:30
parent 22c10e40bb
commit aa71f9744a
+12 -11
View File
@@ -12,25 +12,26 @@
const { region, projectId }: { region: string; projectId: string } = $props();
onMount(async () => {
onMount(() => {
ensureStudioComponent();
await initImagine(region, projectId);
const { changeTheme, initImagineCallbacks } = await getWebComponents();
if (initImagineCallbacks) {
initImagineCallbacks({
onProjectNameChange: (name) => {
invalidate(Dependencies.PROJECT);
}
});
}
initImagine(region, projectId);
return app.subscribe(async ($app) => {
const { changeTheme, initImagineCallbacks } = await getWebComponents();
try {
if (changeTheme) {
changeTheme($app.themeInUse);
}
if (initImagineCallbacks) {
initImagineCallbacks({
onProjectNameChange: () => {
invalidate(Dependencies.PROJECT);
}
});
}
} catch (error) {
console.error('Failed to change theme:', error);
}