Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Commit

Permalink
FIX - post form edit default value was not working
Browse files Browse the repository at this point in the history
Signed-off-by: RaenonX <[email protected]>
  • Loading branch information
RaenonX committed Oct 28, 2020
1 parent f99695c commit 88ddccf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"i18next": "^19.8.2",
"i18next-browser-languagedetector": "^6.0.1",
"i18next-http-backend": "^1.0.21",
"react": "^17.0.0",
"react": "^17.0.1",
"react-bootstrap": "^1.3.0",
"react-dom": "^17.0.0",
"react-ga": "^3.2.0",
Expand Down
7 changes: 3 additions & 4 deletions src/components/elements/questPostForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export const QuestPostForm = ({post, handleSubmit}: QuestPostFormProps) => {
.then((data) => setAvailability(data.available))
.catch(() => setAvailability(false));
};

// endregion

// region Sections
Expand All @@ -132,7 +131,7 @@ export const QuestPostForm = ({post, handleSubmit}: QuestPostFormProps) => {
</Col>
<Col lg={3}>
<Form.Control
as="select" defaultValue={SUPPORTED_LANG_NAME.get(langCode)} disabled={post !== undefined && post !== null}
as="select" defaultValue={langCode} disabled={post !== undefined && post !== null}
onChange={onLangCodeChanged}>
{
SUPPORTED_LANG.map((lang) => {
Expand All @@ -146,11 +145,11 @@ export const QuestPostForm = ({post, handleSubmit}: QuestPostFormProps) => {
const sectionGeneralInfo = (
<>
<Row>
<Col className="pr-2">
<Col className="pr-2" lg={6}>
<h5>{t('posts.quest.general')}</h5>
<MarkdownInput onChanged={onGeneralInfoChanged} rows={5} value={generalInfo}/>
</Col>
<Col className="pl-2">
<Col className="pl-2" lg={6}>
<h5>{t('posts.quest.video')}</h5>
<MarkdownInput onChanged={onVideoChanged} rows={5} value={video}/>
</Col>
Expand Down
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import './bootstrap.css';
import './i18n';

// Initialize Google Analytics
ReactGA.initialize('G-796E69CFJG'); // FIXME: Currently ReactGA seems not working
// https://www.npmjs.com/package/react-ga#upgrading-from-1x-to-2x
// ReactGA.initialize('G-796E69CFJG', {debug: true}); // FIXME: Currently ReactGA seems not working
ReactGA.initialize('G-796E69CFJG');

ReactDOM.render(
<BrowserRouter>
Expand Down

0 comments on commit 88ddccf

Please sign in to comment.