-
-
-
-
-
- The React documentation is available in the following languages:
-
-
-
-
-
In Progress
-
-
-
Needs Contributors
-
-
-
- Don't see your language above?{' '}
-
- Let us know
-
- .
-
+const Languages = ({location}: Props) => {
+ console.log('#', location.hash);
+ const pathname = location.hash.startsWith('#!/')
+ ? location.hash.slice(2)
+ : '/';
+ return (
+
+
+
+
+
+
+
+
+
+ The React documentation is available in the following languages:
+
+
+
+
+
In Progress
+
+
+
Needs Contributors
+
+
+
+ Don't see your language above?{' '}
+
+ Let us know
+
+ .
+
+
-
-
-
-);
+
+
+ );
+};
-const LanguagesGrid = ({languages}) => (
+const LanguagesGrid = ({languages, pathname}) => (
(
key={code}
code={code}
name={name}
+ pathname={pathname}
status={status}
translatedName={translated_name}
/>
@@ -104,7 +111,7 @@ const LanguagesGrid = ({languages}) => (
);
-const Language = ({code, name, status, translatedName}) => {
+const Language = ({code, name, pathname, status, translatedName}) => {
const prefix = code === 'en' ? '' : `${code}.`;
return (
@@ -141,7 +148,7 @@ const Language = ({code, name, status, translatedName}) => {
{status === 0 && translatedName}
{status > 0 && (