fix: empty state search messaging event page (#19064)
* test * fix: adding empty search headline * revert a change
This commit is contained in:
@@ -457,9 +457,9 @@ export const InfiniteEventTypeList = ({
|
||||
if (isPending) return <InfiniteSkeletonLoader />;
|
||||
|
||||
return group.teamId ? (
|
||||
<EmptyEventTypeList group={group} />
|
||||
<EmptyEventTypeList group={group} searchTerm={debouncedSearchTerm} />
|
||||
) : !group.profile.eventTypesLockedByOrg ? (
|
||||
<CreateFirstEventTypeView slug={group.profile.slug ?? ""} />
|
||||
<CreateFirstEventTypeView slug={group.profile.slug ?? ""} searchTerm={debouncedSearchTerm} />
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
@@ -818,13 +818,13 @@ export const InfiniteEventTypeList = ({
|
||||
);
|
||||
};
|
||||
|
||||
const CreateFirstEventTypeView = ({ slug }: { slug: string }) => {
|
||||
const CreateFirstEventTypeView = ({ slug, searchTerm }: { slug: string; searchTerm?: string }) => {
|
||||
const { t } = useLocale();
|
||||
|
||||
return (
|
||||
<EmptyScreen
|
||||
Icon="link"
|
||||
headline={t("new_event_type_heading")}
|
||||
headline={searchTerm ? t("no_result_found_for", { searchTerm }) : t("new_event_type_heading")}
|
||||
description={t("new_event_type_description")}
|
||||
className="mb-16"
|
||||
buttonRaw={
|
||||
@@ -863,12 +863,18 @@ const CTA = ({
|
||||
);
|
||||
};
|
||||
|
||||
const EmptyEventTypeList = ({ group }: { group: EventTypeGroup | InfiniteEventTypeGroup }) => {
|
||||
const EmptyEventTypeList = ({
|
||||
group,
|
||||
searchTerm,
|
||||
}: {
|
||||
group: EventTypeGroup | InfiniteEventTypeGroup;
|
||||
searchTerm?: string;
|
||||
}) => {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
<>
|
||||
<EmptyScreen
|
||||
headline={t("team_no_event_types")}
|
||||
headline={searchTerm ? t("no_result_found_for", { searchTerm }) : t("team_no_event_types")}
|
||||
buttonRaw={
|
||||
<Button
|
||||
href={`?dialog=new&eventPage=${group.profile.slug}&teamId=${group.teamId}`}
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
"accept_license": "Accept License",
|
||||
"still_waiting_for_approval": "An event is still waiting for approval",
|
||||
"event_is_still_waiting": "Event request is still waiting: {{attendeeName}} - {{date}} - {{eventType}}",
|
||||
"no_result_found_for": "No result found for \"{{searchTerm}}\"",
|
||||
"no_more_results": "No more results",
|
||||
"no_results": "No results",
|
||||
"load_more_results": "Load more results",
|
||||
|
||||
Reference in New Issue
Block a user