Skip to content

Commit c0c7f2c

Browse files
committed
fix(ui): auto-open form when onboarding tour is triggered
- Open upload form automatically when custom tutorials onboarding step is active - Ensures form is visible when onboarding targets 'Add new tutorial' title - Only opens form when tutorials exist and form is currently closed
1 parent cd9219b commit c0c7f2c

File tree

1 file changed

+11
-0
lines changed
  • redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Navigation

1 file changed

+11
-0
lines changed

redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Navigation/Navigation.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ const Navigation = (props: Props) => {
8989
[],
9090
)
9191

92+
// Open form when onboarding is triggered and form is not visible
93+
useEffect(() => {
94+
if (
95+
isCustomTutorialsOnboarding &&
96+
customTutorials?.length > 0 &&
97+
!isCreateOpen
98+
) {
99+
setIsCreateOpen(true)
100+
}
101+
}, [isCustomTutorialsOnboarding, customTutorials?.length, isCreateOpen])
102+
92103
const submitCreate = ({ file, link }: FormValues) => {
93104
const formData = new FormData()
94105

0 commit comments

Comments
 (0)