From 70b53e89aa9a861afdf0074bbab5585b86b46270 Mon Sep 17 00:00:00 2001 From: mrfry Date: Mon, 10 Apr 2023 14:46:17 +0200 Subject: [PATCH] possible answers fix, next path fix, prettier format --- next.config.js | 2 +- src/components/LoadingIndicator.js | 10 +- src/components/Question.js | 239 +++++++++++++++-------------- src/components/Questions.js | 146 +++++++++--------- src/components/Subject.js | 176 ++++++++++----------- src/components/SubjectSelector.js | 54 +++---- src/components/dbSelector.js | 64 ++++---- src/components/searchBar.js | 44 +++--- src/pages/_app.js | 2 +- 9 files changed, 377 insertions(+), 360 deletions(-) diff --git a/next.config.js b/next.config.js index 2c1f48f..482514b 100644 --- a/next.config.js +++ b/next.config.js @@ -1,3 +1,3 @@ module.exports = { - basePath: '/data-editor', + basePath: '/dataeditor', } diff --git a/src/components/LoadingIndicator.js b/src/components/LoadingIndicator.js index d197376..d151a9c 100644 --- a/src/components/LoadingIndicator.js +++ b/src/components/LoadingIndicator.js @@ -3,9 +3,9 @@ import React from 'react' import styles from './LoadingIndicator.module.css' export default function LoadingIndicator() { - return ( -
-
-
- ) + return ( +
+
+
+ ) } diff --git a/src/components/Question.js b/src/components/Question.js index 0d5d6ea..571bf3a 100644 --- a/src/components/Question.js +++ b/src/components/Question.js @@ -5,125 +5,130 @@ import styles from './question.module.css' const overflowLength = 140 export default function Question({ question, onChange, index }) { - // FIXME: focus change when input changes to textarea - const possibleAnswers = - question.possibleAnswers || question.data.possibleAnswers + // FIXME: focus change when input changes to textarea + const possibleAnswers = + question.possibleAnswers || question.data.possibleAnswers - return ( -
- {question.Q && question.Q.length > overflowLength ? ( -