This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 230e1f5db fix: set status to done when onboard tour close (#8079)
230e1f5db is described below

commit 230e1f5dbd6179d0dce8149df626ee80bcbfac8a
Author: 青湛 <[email protected]>
AuthorDate: Fri Sep 20 15:35:37 2024 +1200

    fix: set status to done when onboard tour close (#8079)
---
 config-ui/src/index.css                          | 5 +++++
 config-ui/src/routes/onboard/components/tour.tsx | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/config-ui/src/index.css b/config-ui/src/index.css
index c322bc785..a2d32515d 100644
--- a/config-ui/src/index.css
+++ b/config-ui/src/index.css
@@ -70,3 +70,8 @@ p {
 #root {
   height: 100vh;
 }
+
+
+.ant-tour-title {
+  padding-right: 28px;
+}
\ No newline at end of file
diff --git a/config-ui/src/routes/onboard/components/tour.tsx 
b/config-ui/src/routes/onboard/components/tour.tsx
index bac65ce67..5d780a208 100644
--- a/config-ui/src/routes/onboard/components/tour.tsx
+++ b/config-ui/src/routes/onboard/components/tour.tsx
@@ -18,8 +18,8 @@
 
 import { Tour } from 'antd';
 
-import { selectOnboard } from '@/features/onboard';
-import { useAppSelector } from '@/hooks';
+import { done as doneFuc, selectOnboard } from '@/features/onboard';
+import { useAppDispatch, useAppSelector } from '@/hooks';
 
 interface Props {
   nameRef: React.RefObject<HTMLInputElement>;
@@ -28,6 +28,7 @@ interface Props {
 }
 
 export const OnboardTour = ({ nameRef, connectionRef, configRef }: Props) => {
+  const dispatch = useAppDispatch();
   const { step, done } = useAppSelector(selectOnboard);
 
   const steps = [
@@ -53,5 +54,5 @@ export const OnboardTour = ({ nameRef, connectionRef, 
configRef }: Props) => {
     return null;
   }
 
-  return <Tour steps={steps} />;
+  return <Tour steps={steps} onClose={() => dispatch(doneFuc())} />;
 };

Reply via email to