mirror of
https://gitlab.com/MrFry/qmining-data-editor
synced 2026-04-28 11:17:38 +02:00
npm packages update, build fix
This commit is contained in:
@@ -67,7 +67,6 @@ export default function Question({ question, onChange, index }) {
|
||||
// {"text":"a. Kétismeretlenes egyenletrendszert használunk.",
|
||||
// "selectedByUser":true}
|
||||
|
||||
console.log(possibleAnswer)
|
||||
const pa =
|
||||
typeof possibleAnswer === 'string'
|
||||
? possibleAnswer
|
||||
|
||||
@@ -60,6 +60,8 @@ export default function QuestionSearchResult(props) {
|
||||
results = data.reduce(countReducer, 0)
|
||||
}
|
||||
|
||||
console.log(subjs)
|
||||
|
||||
const renderCount = () => {
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -65,8 +65,8 @@ export default function questionView(props) {
|
||||
|
||||
const updateEdits = (e) => {
|
||||
setEdits(
|
||||
edits.map((edit, i) => {
|
||||
if (i === e.index) {
|
||||
edits.map((edit) => {
|
||||
if (edit.index === e.index) {
|
||||
return e
|
||||
} else {
|
||||
return edit
|
||||
@@ -95,7 +95,7 @@ export default function questionView(props) {
|
||||
}
|
||||
if (e.type === 'delete') {
|
||||
rmQuestion(e, selectedDb).then((res) => {
|
||||
if (res.status === 'OK') {
|
||||
if (res.success) {
|
||||
alert('Sikeres törlés')
|
||||
} else {
|
||||
alert('Hiba mentés közben :/')
|
||||
@@ -152,7 +152,7 @@ export default function questionView(props) {
|
||||
}),
|
||||
selectedDb
|
||||
).then((res) => {
|
||||
if (res.status === 'OK') {
|
||||
if (res.success) {
|
||||
alert('Sikeres mentés')
|
||||
} else {
|
||||
alert('Hiba mentés közben :/')
|
||||
|
||||
@@ -153,7 +153,7 @@ export default function SubjectView(props) {
|
||||
const deletedQuestions = deletedIndexes
|
||||
onSave(subj.Name, changedQuestions, deletedQuestions, selectedDb).then(
|
||||
(res) => {
|
||||
if (res.status === 'OK') {
|
||||
if (res.success) {
|
||||
alert('Sikeres mentés')
|
||||
} else {
|
||||
alert('Hiba mentés közben :/')
|
||||
|
||||
+16
-15
@@ -1,22 +1,23 @@
|
||||
import React from 'react'
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
class MyDocument extends Document {
|
||||
static async getInitialProps (ctx) {
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return { ...initialProps }
|
||||
}
|
||||
static async getInitialProps(ctx) {
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return { ...initialProps }
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<body bgcolor='#222426'>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<body style={{ backgroundColor: '#222426' }}>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument
|
||||
|
||||
+7
-13
@@ -48,12 +48,12 @@ const Infos = ({ onClick, renderOKButton }) => {
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
Ha akármi kérdés van,{' '}
|
||||
<a href={`${constants.siteUrl}irc`}>
|
||||
itt lehet chatszobában kérdezni
|
||||
</a>
|
||||
, vagy{' '}
|
||||
<a href={`${constants.siteUrl}feedback`}>
|
||||
Ha akármi kérdés van{' '}
|
||||
<a
|
||||
href={`${constants.siteUrl}contact`}
|
||||
target={'_blank'}
|
||||
rel={'noreferrer'}
|
||||
>
|
||||
itt lehet üzenetet küldeni
|
||||
</a>
|
||||
.
|
||||
@@ -162,7 +162,6 @@ export default function Index({ router }) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const renderView = () => {
|
||||
if (view === views.subject) {
|
||||
return (
|
||||
@@ -189,12 +188,7 @@ export default function Index({ router }) {
|
||||
selectedDb={selectedDb}
|
||||
onChange={setSelectedDb}
|
||||
/>
|
||||
{data && (
|
||||
<QuestionView
|
||||
selectedDb={selectedDb}
|
||||
data={data}
|
||||
/>
|
||||
)}
|
||||
{data && <QuestionView selectedDb={selectedDb} data={data} />}
|
||||
</>
|
||||
)
|
||||
} else if (view === views.questionAdder) {
|
||||
|
||||
Reference in New Issue
Block a user