mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Ensure transition only appears when sidebar is openend and in use
This commit is contained in:
1 parent
70ea552aa8
commit
0ac924e0e5
1 file changed
+9
-5
@@ -27,16 +27,20 @@
|
||||
|
||||
$: selectedProject = loadedProjects.find((project) => project.isSelected);
|
||||
let y: number;
|
||||
let showContentTransition = true;
|
||||
let showContentTransition = false;
|
||||
let timeoutId: NodeJS.Timeout;
|
||||
|
||||
page.subscribe(({ url }) => {
|
||||
$showSubNavigation = url.searchParams.get('openNavbar') === 'true';
|
||||
if (url.search.includes('create-project')) {
|
||||
clearTimeout(timeoutId);
|
||||
|
||||
if (url.pathname.includes('project-')) {
|
||||
timeoutId = setTimeout(() => {
|
||||
showContentTransition = true;
|
||||
}, 1000);
|
||||
} else {
|
||||
showContentTransition = false;
|
||||
}
|
||||
setTimeout(() => {
|
||||
showContentTransition = !url.pathname.includes('organization');
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user