| 1 | import React from "react"; |
| 2 | |
| 3 | function TabsSetDefaultValue() { |
| 4 | React.useEffect(() => { |
| 5 | // Only set if it's not already set |
| 6 | if (!localStorage.getItem("docusaurus.tab.config-example")) { |
| 7 | localStorage.setItem("docusaurus.tab.config-example", "json"); |
| 8 | } |
| 9 | }, []); |
| 10 | |
| 11 | return null; |
| 12 | } |
| 13 | |
| 14 | export default function Root({ children }) { |
| 15 | return ( |
| 16 | <> |
| 17 | <TabsSetDefaultValue /> |
| 18 | {children} |
| 19 | </> |
| 20 | ); |
| 21 | } |