feat: make yarn the default tab in docs (#1406)
This commit is contained in:
19
www/docs/src/theme/Tabs/index.js
Normal file
19
www/docs/src/theme/Tabs/index.js
Normal file
@@ -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