Feedback: the recommendation box at the bottom, a contact page
- The "would you recommend us?" box moves from under the header to the bottom of the page, after the content and apart from it (up top it drew the eye away); not on pages with the public footer - /kapcsolat, linked from the footers: logged in, the feedback page; otherwise the e-mail address, and that logging in lets one write on the site; in the sitemap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { api, errorText } from "@/lib/api";
|
||||
|
||||
/**
|
||||
* "Would you recommend us?" (0–10), once, as a bar under the header (no
|
||||
* pop-up, no e-mail). Closing it counts: it does not come again.
|
||||
* "Would you recommend us?" (0–10), once, as a box at the bottom of the page,
|
||||
* after its content (no pop-up, no e-mail). Not on pages with the public
|
||||
* footer (it would come under it): the next app page shows it. Closing it
|
||||
* counts: it does not come again.
|
||||
*/
|
||||
export function NpsBanner() {
|
||||
const pathname = usePathname();
|
||||
const [footer, setFooter] = useState(true);
|
||||
useEffect(() => setFooter(document.querySelector(".lp-footer") !== null), [pathname]);
|
||||
const [shown, setShown] = useState(true);
|
||||
const [score, setScore] = useState<number | null>(null);
|
||||
const [comment, setComment] = useState("");
|
||||
@@ -35,7 +41,7 @@ export function NpsBanner() {
|
||||
}
|
||||
}
|
||||
|
||||
if (!shown) return null;
|
||||
if (!shown || footer) return null;
|
||||
if (thanks) {
|
||||
return (
|
||||
<aside className="nps" aria-label="Köszönjük">
|
||||
|
||||
@@ -16,6 +16,7 @@ export function PublicFooter() {
|
||||
<Link href="/retrograd">Retrográd bolygók</Link>
|
||||
<Link href="/pelda">Példaelemzés</Link>
|
||||
<Link href="/kartyajoslas/pelda">Példajóslás</Link>
|
||||
<Link href="/kapcsolat">Kapcsolat</Link>
|
||||
<Link href="/aszf">ÁSZF</Link>
|
||||
<Link href="/adatvedelem">Adatvédelem</Link>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user