feat: make yarn the default tab in docs (#1406)
This commit is contained in:
1 parent
7e306af687
commit
81fe558c50
1 file changed
+19
@@ -0,0 +1,19 @@
|
|||||||
|
import React, { useEffect } from 'react';
|
||||||
|
|
||||||
|
import Tabs from '@theme-original/Tabs';
|
||||||
|
|
||||||
|
export default function TabsWrapper(props) {
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!window.localStorage.getItem('docusaurus.tab.npm2yarn')) {
|
||||||
|
//set the default
|
||||||
|
window.localStorage.setItem('docusaurus.tab.npm2yarn', 'yarn')
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Tabs {...props} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user