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 { t } = useTranslation();
|
||||
|
||||
const [randomFrase, setRandomFrase] = useState<string>(
|
||||
// biome-ignore lint/style/noNonNullAssertion: <exists>
|
||||
t.code_search_frases[0]!,
|
||||
t.code_search_frases[0] || backupFrase,
|
||||
);
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
const randomIndex = Math.floor(
|
||||
Math.random() * t.code_search_frases.length,
|
||||
);
|
||||
// biome-ignore lint/style/noNonNullAssertion: <exists>
|
||||
setRandomFrase(t.code_search_frases[randomIndex]!);
|
||||
setRandomFrase(t.code_search_frases[randomIndex] || backupFrase);
|
||||
}, 5000);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
|
|
|
|||
|
|
@ -290,7 +290,11 @@ export const en: LangDict = {
|
|||
"The document you are looking for is not available or does not exist.",
|
||||
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: {
|
||||
pagamento: "Payment",
|
||||
titolo: "PURCHASE",
|
||||
|
|
|
|||
|
|
@ -293,9 +293,9 @@ export const it: LangDict = {
|
|||
CTA: "Se hai bisogno di assistenza, contatta il supporto tecnico.",
|
||||
},
|
||||
code_search_frases: [
|
||||
"Cerca con codice",
|
||||
"Inserisci il codice",
|
||||
"Digita il codice",
|
||||
"Cerca con codice 👈",
|
||||
"Inserisci il codice ✨",
|
||||
"Digita il codice ✏️",
|
||||
],
|
||||
pricing_cmp: {
|
||||
titolo: "Paga in base alla tua ricerca",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue