mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-23 20:24:34 +02:00
modified: messages/en-US.json
modified: src/components/tags/autocomplete.tsx
This commit is contained in:
parent
547e777eb0
commit
ae4ef4eb99
2 changed files with 6 additions and 3 deletions
|
@ -364,7 +364,7 @@
|
||||||
"inviteRemoveErrorDescription": "An error occurred while removing the invitation.",
|
"inviteRemoveErrorDescription": "An error occurred while removing the invitation.",
|
||||||
"inviteRemoved": "Invitation removed",
|
"inviteRemoved": "Invitation removed",
|
||||||
"inviteRemovedDescription": "The invitation for {email} has been removed.",
|
"inviteRemovedDescription": "The invitation for {email} has been removed.",
|
||||||
"inviteQuestionRemove ": "Are you sure you want to remove the invitation {email}?",
|
"inviteQuestionRemove": "Are you sure you want to remove the invitation {email}?",
|
||||||
"inviteMessageRemove": "Once removed, this invitation will no longer be valid. You can always re-invite the user later.",
|
"inviteMessageRemove": "Once removed, this invitation will no longer be valid. You can always re-invite the user later.",
|
||||||
"inviteMessageConfirm": "To confirm, please type the email address of the invitation below.",
|
"inviteMessageConfirm": "To confirm, please type the email address of the invitation below.",
|
||||||
"inviteQuestionRegenerate": "Are you sure you want to regenerate the invitation for {email}? This will revoke the previous invitation.",
|
"inviteQuestionRegenerate": "Are you sure you want to regenerate the invitation for {email}? This will revoke the previous invitation.",
|
||||||
|
@ -906,5 +906,6 @@
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"usersAll": "All Users",
|
"usersAll": "All Users",
|
||||||
"license": "License",
|
"license": "License",
|
||||||
"pangolinDashboard": "Dashboard - Pangolin"
|
"pangolinDashboard": "Dashboard - Pangolin",
|
||||||
|
"noResults": "No results found."
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { TagInputStyleClassesProps, type Tag as TagType } from "./tag-input";
|
||||||
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
import { cn } from "@app/lib/cn";
|
import { cn } from "@app/lib/cn";
|
||||||
|
import { useTranslations } from 'next-intl';
|
||||||
|
|
||||||
type AutocompleteProps = {
|
type AutocompleteProps = {
|
||||||
tags: TagType[];
|
tags: TagType[];
|
||||||
|
@ -40,6 +41,7 @@ export const Autocomplete: React.FC<AutocompleteProps> = ({
|
||||||
const triggerRef = useRef<HTMLButtonElement | null>(null);
|
const triggerRef = useRef<HTMLButtonElement | null>(null);
|
||||||
const inputRef = useRef<HTMLInputElement | null>(null);
|
const inputRef = useRef<HTMLInputElement | null>(null);
|
||||||
const popoverContentRef = useRef<HTMLDivElement | null>(null);
|
const popoverContentRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
const t = useTranslations();
|
||||||
|
|
||||||
const [popoverWidth, setPopoverWidth] = useState<number>(0);
|
const [popoverWidth, setPopoverWidth] = useState<number>(0);
|
||||||
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
||||||
|
@ -342,7 +344,7 @@ export const Autocomplete: React.FC<AutocompleteProps> = ({
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="py-6 text-center text-sm">
|
<div className="py-6 text-center text-sm">
|
||||||
No results found.
|
{t('noResults')}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue