mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: syntax, lint.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user