From b66b3b40778c7d4ac597e4248329e3abfae43c5d Mon Sep 17 00:00:00 2001 From: ryjiang Date: Wed, 20 Dec 2023 11:13:57 +0800 Subject: [PATCH] fix tab issue Signed-off-by: ryjiang --- src/components/home/code.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/home/code.jsx b/src/components/home/code.jsx index 8364c729f..887e7f887 100644 --- a/src/components/home/code.jsx +++ b/src/components/home/code.jsx @@ -75,6 +75,7 @@ const Code = props => { timeId = setInterval(() => { const keys = Object.keys(EXAMPLES); keyIndex === 2 ? (keyIndex = 0) : keyIndex++; + setValue(0) setActivExample(EXAMPLES[keys[keyIndex]]); }, 10000); return () => { @@ -117,7 +118,12 @@ const Code = props => { }; case EXAMPLES.manage: return { - tabs: ['Create collection', 'Create index', 'Insert data', 'Upsert data'], + tabs: [ + 'Create collection', + 'Create index', + 'Insert data', + 'Upsert data', + ], learnMoreLink: `/docs/create_collection.md`, }; case EXAMPLES.install: