feat: update search phrases with emojis for enhanced user experience
This commit is contained in:
parent
94fd389afa
commit
b3d2d3f4fd
3 changed files with 11 additions and 8 deletions
|
|
@ -167,20 +167,19 @@ const AutocompleteSearchBox = ({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const backupFrase = "Inserisci il codice 👈";
|
||||||
const MovingText = ({ hidden }: { hidden: boolean }) => {
|
const MovingText = ({ hidden }: { hidden: boolean }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const [randomFrase, setRandomFrase] = useState<string>(
|
const [randomFrase, setRandomFrase] = useState<string>(
|
||||||
// biome-ignore lint/style/noNonNullAssertion: <exists>
|
t.code_search_frases[0] || backupFrase,
|
||||||
t.code_search_frases[0]!,
|
|
||||||
);
|
);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
const randomIndex = Math.floor(
|
const randomIndex = Math.floor(
|
||||||
Math.random() * t.code_search_frases.length,
|
Math.random() * t.code_search_frases.length,
|
||||||
);
|
);
|
||||||
// biome-ignore lint/style/noNonNullAssertion: <exists>
|
setRandomFrase(t.code_search_frases[randomIndex] || backupFrase);
|
||||||
setRandomFrase(t.code_search_frases[randomIndex]!);
|
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,11 @@ export const en: LangDict = {
|
||||||
"The document you are looking for is not available or does not exist.",
|
"The document you are looking for is not available or does not exist.",
|
||||||
CTA: "If you need assistance, please contact technical support.",
|
CTA: "If you need assistance, please contact technical support.",
|
||||||
},
|
},
|
||||||
code_search_frases: ["Search by code", "Enter the code", "Type the code"],
|
code_search_frases: [
|
||||||
|
"Search by code 👈",
|
||||||
|
"Enter the code ✨",
|
||||||
|
"Type the code ✏️",
|
||||||
|
],
|
||||||
acquisto: {
|
acquisto: {
|
||||||
pagamento: "Payment",
|
pagamento: "Payment",
|
||||||
titolo: "PURCHASE",
|
titolo: "PURCHASE",
|
||||||
|
|
|
||||||
|
|
@ -293,9 +293,9 @@ export const it: LangDict = {
|
||||||
CTA: "Se hai bisogno di assistenza, contatta il supporto tecnico.",
|
CTA: "Se hai bisogno di assistenza, contatta il supporto tecnico.",
|
||||||
},
|
},
|
||||||
code_search_frases: [
|
code_search_frases: [
|
||||||
"Cerca con codice",
|
"Cerca con codice 👈",
|
||||||
"Inserisci il codice",
|
"Inserisci il codice ✨",
|
||||||
"Digita il codice",
|
"Digita il codice ✏️",
|
||||||
],
|
],
|
||||||
pricing_cmp: {
|
pricing_cmp: {
|
||||||
titolo: "Paga in base alla tua ricerca",
|
titolo: "Paga in base alla tua ricerca",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue