File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 8686 "engines" : {
8787 "node" : " >=18.0"
8888 },
89- "packageManager" : " pnpm@10.12.1 "
89+ "packageManager" : " pnpm@10.24.0+sha512.01ff8ae71b4419903b65c60fb2dc9d34cf8bb6e06d03bde112ef38f7a34d6904c424ba66bea5cdcf12890230bf39f9580473140ed9c946fef328b6e5238a345a "
9090}
Original file line number Diff line number Diff line change 11import React from "react" ;
22import useDocusaurusContext from "@docusaurus/useDocusaurusContext" ;
33
4- const IS_CHINA_SITE = process . env . CHINA === "true" ;
5-
64/**
7- * A component that conditionally renders its children based on the CHINA environment variable.
8- * If CHINA is 'true', the children (typically Markdown content) will not be rendered.
5+ * A component that conditionally renders its children based on the `IS_CHINA_SITE` environment variable.
6+ * If `IS_CHINA_SITE` is 'true', the children (typically Markdown content) will not be rendered.
97 */
108export default function GlobalContent ( { children } ) {
11- if ( IS_CHINA_SITE ) {
12- return null ; // Do not render children if in China site context
9+ if ( useDocusaurusContext ( ) . siteConfig . customFields . IS_CHINA_SITE ) {
10+ return null ; // Do not render children if in the China site context
1311 }
1412 return < > { children } </ > ; // Render children otherwise
1513}
You can’t perform that action at this time.
0 commit comments