Skip to content

Commit

Permalink
Fix dependencies (#19)
Browse files Browse the repository at this point in the history
* fix: invalid dependencies

* fix: wrong path

* fix: build failed because jsx used, not tsx
  • Loading branch information
dice4x4 authored Jun 29, 2022
1 parent e8247e8 commit ccb2cd7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ COPY --from=builder /opt/app/node_modules /opt/app/node_modules
CMD node /opt/app/index.js


FROM node:16 as dev
FROM node:lts-alpine as dev

ENV NODE_ENV development

WORKDIR /soroka-backend
WORKDIR /opt/app

COPY --from=builder /opt/app/ /soroka-backend
COPY --from=builder /opt/app/ /opt/app

RUN npm install

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'

const ImportAction = () => {
async function submitForm(form) {
async function submitForm(form: HTMLFormElement) {
const formData = new FormData(form)

const response = await fetch(
Expand All @@ -24,7 +24,7 @@ const ImportAction = () => {
style={{display: "flex", flexDirection: "column"}}
onSubmit={(event) => {
event.preventDefault()
submitForm(event.target)
submitForm(event.currentTarget)
}}
>
<label style={{fontSize: "1.5rem"}} htmlFor="csvFile">
Expand Down
4 changes: 2 additions & 2 deletions src/routes/admin/admin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import AdminJS from 'adminjs'
import AdminJSExpress from '@adminjs/express'
import AdminJSSequelize = require('@adminjs/sequelize')
import * as AdminJSSequelize from '@adminjs/sequelize'
import sequelize from '../../providers/db'

AdminJS.registerAdapter(AdminJSSequelize)
Expand Down Expand Up @@ -36,7 +36,7 @@ const adminJs = new AdminJS({
icon: 'Upload',
isVisible: true,
handler: async () => { console.log() },
component: AdminJS.bundle('../../admin/components/import-action-component.jsx'),
component: AdminJS.bundle('../../admin/components/import-action-component'),
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"esModuleInterop": true,
"strictPropertyInitialization": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true
"emitDecoratorMetadata": true,
"jsx": "react"
}
}

0 comments on commit ccb2cd7

Please sign in to comment.