Skip to content

Commit c33d0de

Browse files
committed
Merge branch 'develop'
2 parents 60907ad + 918dbb2 commit c33d0de

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

src/app/components/Editor.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const checkWarnings = async (values: PublicCode) => {
6565
};
6666

6767
const resolver: Resolver<PublicCode | PublicCodeWithDeprecatedFields> = async (values) => {
68+
console.log(values)
6869
const res = await validatorFn(values as PublicCode);
6970

7071
if (res.errors.length === 0)
@@ -373,6 +374,18 @@ export default function Editor() {
373374
required
374375
/>
375376
</Col>
377+
<Col>
378+
<EditorDescriptionInput<"documentation">
379+
fieldName="documentation"
380+
lang={lang}
381+
/>
382+
</Col>
383+
<Col>
384+
<EditorDescriptionInput<"apiDocumentation">
385+
fieldName="apiDocumentation"
386+
lang={lang}
387+
/>
388+
</Col>
376389
<Col>
377390
<EditorFeatures lang={lang} />
378391
</Col>

src/app/components/PubliccodeYmlLanguages.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { useEffect } from 'react';
1+
import { upperFirst } from 'lodash';
22
import { useTranslation } from "react-i18next";
3-
import { useAppDispatch } from "../store";
4-
import { getPubliccodeYmlLanguages, setPubliccodeYmlLanguages } from "../store/publiccodeYmlLanguages";
5-
import { Multiselect } from "react-widgets";
63
import { useSelector } from 'react-redux';
7-
import { allLangs } from '../../i18n';
8-
import { upperFirst } from 'lodash';
4+
import { Multiselect } from "react-widgets";
95
import { RenderItemProp } from 'react-widgets/cjs/List';
6+
import { allLangs } from '../../i18n';
7+
import { useAppDispatch } from "../store";
8+
import { getPubliccodeYmlLanguages, setPubliccodeYmlLanguages } from "../store/publiccodeYmlLanguages";
109

1110
interface Language {
1211
value: string;
@@ -27,16 +26,11 @@ const renderTagValue = ({ item }: { item: Language }) => (
2726

2827
export const PubliccodeYmlLanguages = (): JSX.Element => {
2928
const dispatch = useAppDispatch();
30-
const { i18n, t } = useTranslation();
29+
const { t } = useTranslation();
3130
const publiccodeYmlLanguages = useSelector(getPubliccodeYmlLanguages)
3231

33-
useEffect(() => {
34-
dispatch(setPubliccodeYmlLanguages([i18n.language]));
35-
console.log(i18n.language)
36-
}, [dispatch, i18n.language]);
37-
3832
const handleChange = (newSelection: Language[]) => {
39-
if (newSelection.length != 0){
33+
if (newSelection.length != 0) {
4034
dispatch(setPubliccodeYmlLanguages(newSelection.map(l => l.value)));
4135
}
4236
};

src/main.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// import { StrictMode } from 'react'
2-
import { createRoot } from 'react-dom/client'
3-
import App from './app/App.tsx'
2+
import { createRoot } from 'react-dom/client';
3+
import App from './app/App.tsx';
44
// import './index.css'
5+
import packageJson from '../package.json';
6+
7+
console.log(`${packageJson.name} ${packageJson.version}`);
58

69
createRoot(document.getElementById('app')!).render(
710
// <StrictMode>
8-
<App />
11+
<App />
912
// </StrictMode>,
1013
)

0 commit comments

Comments
 (0)