Skip to content

Commit

Permalink
handle upload and show transformed result
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Sep 20, 2021
1 parent 4083c62 commit 903c68a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
19 changes: 15 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
module.exports = {
reactStrictMode: true,
assetPrefix: '/i18next-v4-format-converter-web/', // because of gh-pages
}
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')

module.exports = (phase, { defaultConfig }) => {
if (phase === PHASE_DEVELOPMENT_SERVER) {
return {
/* development only config options here */
reactStrictMode: true,
}
}

return {
reactStrictMode: true,
assetPrefix: '/i18next-v4-format-converter-web/', // because of gh-pages
}
}
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Home() {
const [targetJSON, setTargetJSON] = useState(convert('en', DUMMY_JSON));

useEffect(() => {
if (result) setSourceJSON(result);
if (result) handleChange(result);
if (file && file.name) {
const p = file.name.split('.');
if (p.length > 2) {
Expand Down

0 comments on commit 903c68a

Please sign in to comment.