feat: centralize popup texts in new admin tab /admin/popups
- New admin page for shared popup texts (success, waiting list, error, Instagram hint) - Removed popup fields from MC and Open Day admin editors - All SignupModals now read from centralized popups config - Stored as "popups" section in DB with fallback defaults
This commit is contained in:
@@ -18,6 +18,10 @@ interface SignupModalProps {
|
||||
successMessage?: string;
|
||||
/** Custom waiting list message */
|
||||
waitingMessage?: string;
|
||||
/** Custom error message */
|
||||
errorMessage?: string;
|
||||
/** Custom Instagram hint text */
|
||||
instagramHint?: string;
|
||||
/** Callback with API response data on success */
|
||||
onSuccess?: (data: Record<string, unknown>) => void;
|
||||
}
|
||||
@@ -31,6 +35,8 @@ export function SignupModal({
|
||||
extraBody,
|
||||
successMessage,
|
||||
waitingMessage,
|
||||
errorMessage,
|
||||
instagramHint,
|
||||
onSuccess,
|
||||
}: SignupModalProps) {
|
||||
const [name, setName] = useState("");
|
||||
@@ -167,7 +173,7 @@ export function SignupModal({
|
||||
className="mt-3 inline-flex items-center gap-1.5 text-sm text-pink-400 hover:text-pink-300"
|
||||
>
|
||||
<Instagram size={14} />
|
||||
По вопросам пишите в Instagram
|
||||
{instagramHint || "По вопросам пишите в Instagram"}
|
||||
</a>
|
||||
</>
|
||||
) : (
|
||||
@@ -190,7 +196,7 @@ export function SignupModal({
|
||||
</div>
|
||||
<h3 className="text-lg font-bold text-white">Что-то пошло не так</h3>
|
||||
<p className="mt-2 text-sm text-neutral-400">
|
||||
Не удалось отправить заявку. Свяжитесь с нами через Instagram — мы запишем вас!
|
||||
{errorMessage || "Не удалось отправить заявку. Свяжитесь с нами через Instagram — мы запишем вас!"}
|
||||
</p>
|
||||
<button
|
||||
onClick={openInstagramDM}
|
||||
|
||||
Reference in New Issue
Block a user