fixed building and local nmp start
This commit is contained in:
parent
4be51a2859
commit
f9d9519616
File diff suppressed because one or more lines are too long
@ -17,5 +17,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"resultsInfo": null
|
||||||
}
|
}
|
@ -17,5 +17,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"resultsInfo": null
|
||||||
}
|
}
|
@ -25,7 +25,7 @@
|
|||||||
"@emotion/styled": "^11.10.5",
|
"@emotion/styled": "^11.10.5",
|
||||||
"@emotion/core": "^11.0.0",
|
"@emotion/core": "^11.0.0",
|
||||||
"@emotion/react": "^11.10.5",
|
"@emotion/react": "^11.10.5",
|
||||||
"lodash": "^4.17.21"
|
"lodash-es": "^4.17.21"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
@ -48,6 +48,7 @@
|
|||||||
"@types/react": "^18.2.0",
|
"@types/react": "^18.2.0",
|
||||||
"@types/react-dom": "^18.2.1",
|
"@types/react-dom": "^18.2.1",
|
||||||
"@types/react-redux": "^7.1.25",
|
"@types/react-redux": "^7.1.25",
|
||||||
|
"@types/lodash-es": "^4.17.12",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"homepage": ".",
|
"homepage": ".",
|
||||||
|
@ -20,7 +20,8 @@ export interface SurveyDto {
|
|||||||
title: string,
|
title: string,
|
||||||
intro: string,
|
intro: string,
|
||||||
settings: SettingsDto,
|
settings: SettingsDto,
|
||||||
questions: QuestionDto[]
|
questions: QuestionDto[],
|
||||||
|
resultsInfo?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const Api = {
|
const Api = {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import React, {useEffect} from 'react'
|
import React, {useEffect} from 'react'
|
||||||
import DateDisplay from '../components/DateDisplay'
|
|
||||||
import {SnackbarOrigin, useSnackbar} from 'notistack';
|
import {SnackbarOrigin, useSnackbar} from 'notistack';
|
||||||
import Api, {SurveyDto} from "./../api/Api";
|
import Api, {SurveyDto} from "./../api/Api";
|
||||||
import Survey from "./../components/survey/Survey";
|
import Survey from "./../components/survey/Survey";
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { createReducer } from '@reduxjs/toolkit'
|
import { createReducer } from '@reduxjs/toolkit'
|
||||||
import {addAnswer, setContents} from '../actions/data'
|
import {addAnswer, setContents} from '../actions/data'
|
||||||
import initialState, {StoreContent, ResultByGroup} from "../initialState";
|
import initialState, {StoreContent, ResultByGroup} from "../initialState";
|
||||||
import * as _ from "lodash";
|
import * as _ from "lodash-es";
|
||||||
|
|
||||||
const reduceState = (array: ResultByGroup[], addon: ResultByGroup) => {
|
const reduceState = (array: ResultByGroup[], addon: ResultByGroup) => {
|
||||||
var added = false;
|
let added = false;
|
||||||
array.forEach((result) => {
|
array.forEach((result) => {
|
||||||
if (result.group === addon.group) {
|
if (result.group === addon.group) {
|
||||||
added = true
|
added = true
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { render, screen } from '@testing-library/react'
|
import { render, screen } from '@testing-library/react'
|
||||||
import DateDisplay from '../../components/DateDisplay'
|
|
||||||
|
|
||||||
test('renders current date', () => {
|
test('renders current date', () => {
|
||||||
render(<DateDisplay />)
|
|
||||||
const timeFormat = screen.getByText(/GMT/i)
|
const timeFormat = screen.getByText(/GMT/i)
|
||||||
expect(timeFormat).toBeInTheDocument()
|
expect(timeFormat).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
|
@ -2242,6 +2242,18 @@
|
|||||||
resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz"
|
resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz"
|
||||||
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
|
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
|
||||||
|
|
||||||
|
"@types/lodash-es@^4.17.12":
|
||||||
|
version "4.17.12"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.12.tgz#65f6d1e5f80539aa7cfbfc962de5def0cf4f341b"
|
||||||
|
integrity sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==
|
||||||
|
dependencies:
|
||||||
|
"@types/lodash" "*"
|
||||||
|
|
||||||
|
"@types/lodash@*":
|
||||||
|
version "4.14.202"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8"
|
||||||
|
integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==
|
||||||
|
|
||||||
"@types/mime@*":
|
"@types/mime@*":
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz"
|
resolved "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz"
|
||||||
@ -6560,6 +6572,11 @@ locate-path@^6.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
p-locate "^5.0.0"
|
p-locate "^5.0.0"
|
||||||
|
|
||||||
|
lodash-es@^4.17.21:
|
||||||
|
version "4.17.21"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
|
||||||
|
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
|
||||||
|
|
||||||
lodash.debounce@^4.0.8:
|
lodash.debounce@^4.0.8:
|
||||||
version "4.0.8"
|
version "4.0.8"
|
||||||
resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz"
|
resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz"
|
||||||
|
Loading…
Reference in New Issue
Block a user