qid в парсе берётся из урла

This commit is contained in:
Nastya 2023-12-20 00:59:35 +03:00
parent b0e5041a0a
commit 7df3bc3b31

@ -16,7 +16,7 @@ const QID =
process.env.NODE_ENV === "production" ?
window.location.pathname.replace(/\//g, '')
:
"c1ee11d2-ed5a-47d1-b500-bda6fd442114"
"e593a043-8ad2-4e16-9bf2-afb4f28385eb"
export const ViewPage = () => {
@ -32,9 +32,11 @@ export const ViewPage = () => {
//@ts-ignore
const settings = data.settings
console.log(data)
console.log(window.location.pathname.replace(/\//g, ''))
const parseData = {
settings: {
qid: "c1ee11d2-ed5a-47d1-b500-bda6fd442114",
//@ts-ignore
qid: window.location.pathname.replace(/\//g, '') || "e593a043-8ad2-4e16-9bf2-afb4f28385eb",
fp: settings.fp,
rep: settings.rep,
name: settings.name,
@ -95,7 +97,7 @@ console.log(items)
if (errormessage) return <ApologyPage message={errormessage} />
if (visualStartPage === undefined) return <Skeleton sx={{ bgcolor: 'grey', width: "100vw", height: "100vh" }} variant="rectangular" />;
if (cnt === 0) return <ApologyPage message="Нет созданных вопросов" />
if (cnt === 0 || (cnt === 1 && items[0].type === "result")) return <ApologyPage message="Нет созданных вопросов" />
return (
<Box>
{