fix quiz installation button text
This commit is contained in:
parent
7e006b759f
commit
c81e54b06f
@ -32,7 +32,10 @@ export default function QuizInstallationCard() {
|
||||
if (!quiz) return null;
|
||||
|
||||
const nextButton = (
|
||||
<Button onClick={() => setWidgetSetupSettings((prev) => ({ ...prev, step: 3 }))} variant="contained">
|
||||
<Button
|
||||
onClick={() => setWidgetSetupSettings((prev) => ({ ...prev, step: 3 }))}
|
||||
variant="contained"
|
||||
>
|
||||
Далее
|
||||
</Button>
|
||||
);
|
||||
@ -91,7 +94,7 @@ export default function QuizInstallationCard() {
|
||||
}));
|
||||
}}
|
||||
>
|
||||
Настройка кнопки
|
||||
{installationStepButtonTextByWidgetType[widgetSetupSettings.widgetType]}
|
||||
</InstallationStepButton>
|
||||
<InstallationStepButton
|
||||
state={widgetSetupSettings.step === 3 ? "active" : "inactive"}
|
||||
@ -180,22 +183,45 @@ export default function QuizInstallationCard() {
|
||||
) : (
|
||||
<>
|
||||
{widgetSetupSettings.widgetType === "container" && (
|
||||
<ContainerWidgetSetup step={widgetSetupSettings.step} nextButton={nextButton} />
|
||||
<ContainerWidgetSetup
|
||||
step={widgetSetupSettings.step}
|
||||
nextButton={nextButton}
|
||||
/>
|
||||
)}
|
||||
{widgetSetupSettings.widgetType === "button" && (
|
||||
<ButtonWidgetSetup step={widgetSetupSettings.step} nextButton={nextButton} />
|
||||
<ButtonWidgetSetup
|
||||
step={widgetSetupSettings.step}
|
||||
nextButton={nextButton}
|
||||
/>
|
||||
)}
|
||||
{widgetSetupSettings.widgetType === "banner" && (
|
||||
<BannerWidgetSetup step={widgetSetupSettings.step} nextButton={nextButton} />
|
||||
<BannerWidgetSetup
|
||||
step={widgetSetupSettings.step}
|
||||
nextButton={nextButton}
|
||||
/>
|
||||
)}
|
||||
{widgetSetupSettings.widgetType === "popup" && (
|
||||
<PopupWidgetSetup step={widgetSetupSettings.step} nextButton={nextButton} />
|
||||
<PopupWidgetSetup
|
||||
step={widgetSetupSettings.step}
|
||||
nextButton={nextButton}
|
||||
/>
|
||||
)}
|
||||
{widgetSetupSettings.widgetType === "side" && (
|
||||
<SideWidgetSetup step={widgetSetupSettings.step} nextButton={nextButton} />
|
||||
<SideWidgetSetup
|
||||
step={widgetSetupSettings.step}
|
||||
nextButton={nextButton}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
const installationStepButtonTextByWidgetType: Record<WidgetType, string> = {
|
||||
button: "Настройка кнопки",
|
||||
banner: "Настройка баннера",
|
||||
container: "Настройка квиза",
|
||||
popup: "Настройка автооткрытия",
|
||||
side: "Настройка виджета",
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user