diff --git a/src/components/footer/FooterAbout.tsx b/src/components/footer/FooterAbout.tsx index 35017ac..25ec35a 100644 --- a/src/components/footer/FooterAbout.tsx +++ b/src/components/footer/FooterAbout.tsx @@ -7,10 +7,11 @@ export interface FooterAboutProps extends FooterPartsPrimitiveProps { entityLink?: string; entityName?: string; + entityText?: string; } const FooterAbout = (props: React.PropsWithChildren) => { - const { className, children, entityLink, entityName, ...rest } = props; + const { className, children, entityLink, entityName, entityText, ...rest } = props; if (children) {
{props.children} @@ -27,7 +28,7 @@ const FooterAbout = (props: React.PropsWithChildren) => { ), )} > - Built with 🧡 by the{" "} + {entityText ?? "Built with 🧡 by the "}{" "} { feedbackLink: string; + enitityText?: string; + entityCtaText?: string; } const FooterFeedback = ( props: React.PropsWithChildren, ) => { - const { className, children, feedbackLink, ...rest } = props; + const { className, children, feedbackLink, enitityText="We'd love to hear your feedback on this project?", entityCtaText="Give feedback", ...rest } = props; if (children) {
{props.children} @@ -27,14 +29,14 @@ const FooterFeedback = ( ), )} > - We'd love to hear your feedback on this project? + {enitityText} - Give Feedback + {entityCtaText}
); diff --git a/src/components/footer/FooterPublic.tsx b/src/components/footer/FooterPublic.tsx index a224b4e..1b347a0 100644 --- a/src/components/footer/FooterPublic.tsx +++ b/src/components/footer/FooterPublic.tsx @@ -6,11 +6,13 @@ import clsx from "clsx"; export interface FooterPublicProps extends FooterPartsPrimitiveProps { dashboardLink: string; + entityText?: string; } const FooterPublic = ({ className, dashboardLink, + entityText = "View our public visitor count", ...rest }: FooterPublicProps) => { return ( @@ -26,7 +28,7 @@ const FooterPublic = ({ )} {...rest} > - View our public visitor count + {entityText} ); }; diff --git a/src/utils/filter.ts b/src/utils/filter.ts index 63d1dba..e306839 100644 --- a/src/utils/filter.ts +++ b/src/utils/filter.ts @@ -1,9 +1,10 @@ export function matchCharactersWithRegex(word: string, searchTerm: string) { const escapedSearchTerm = searchTerm.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + // Construct a regex pattern that enforces order but allows small gaps const regexPattern = escapedSearchTerm .split("") - .map((char) => `(?=.*${char})`) + .map((char, index) => (index === 0 ? char : `[^${char}]{0,2}${char}`)) // Allow at most 2 non-matching chars between each .join(""); const regex = new RegExp(regexPattern, "i"); // 'i' flag for case-insensitive matching