You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2024/09/20 03:12:33 UTC
(incubator-devlake) 01/01: fix: set status to done when onboard tour close
This is an automated email from the ASF dual-hosted git repository.
mintsweet pushed a commit to branch fix-onboard
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit d5be4b993577ce97e9bc9517a8847fcec9d51515
Author: mintsweet <0x...@gmail.com>
AuthorDate: Fri Sep 20 15:12:19 2024 +1200
fix: set status to done when onboard tour close
---
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())} />;
};