Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
✨ Add legal and sports industries to identify landing page segments (#3054)
Luke Vella17c149380813
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex 73ac7f48f..caa85d7b3 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -372,6 +372,7 @@"industryGovernment": "Government","industryHealthcare": "Healthcare","industryHospitality": "Hospitality",+ "industryLegal": "Legal","industryNone": "Prefer not to say","industryNonProfit": "Non-profit","industryOther": "Other",@@ -380,6 +381,7 @@"industryRealEstate": "Real estate","industryRecruiting": "Recruiting","industryReligiousOrganisation": "Religious organisation",+ "industrySportsAndRecreation": "Sports and recreation","industryTechnology": "Technology","instanceSettingsDescription": "Configure your instance settings","invalidEmailAddress": "Please enter a valid email address",diff --git a/apps/web/src/features/space/components/industry-select.tsx b/apps/web/src/features/space/components/industry-select.tsxindex 9d596ade3..7169bec36 100644--- a/apps/web/src/features/space/components/industry-select.tsx+++ b/apps/web/src/features/space/components/industry-select.tsx@@ -34,6 +34,15 @@ function IndustryLabel({ industry }: { industry: Industry }) {return <Trans i18nKey="industryNonProfit" defaults="Non-profit" />;case "government":return <Trans i18nKey="industryGovernment" defaults="Government" />;+ case "legal":+ return <Trans i18nKey="industryLegal" defaults="Legal" />;+ case "sports_and_recreation":+ return (+ <Trans+ i18nKey="industrySportsAndRecreation"+ defaults="Sports and recreation"+ />+ );case "recruiting":return <Trans i18nKey="industryRecruiting" defaults="Recruiting" />;case "real_estate":diff --git a/apps/web/src/features/space/constants.ts b/apps/web/src/features/space/constants.tsindex efd22d6b5..192e4db23 100644--- a/apps/web/src/features/space/constants.ts+++ b/apps/web/src/features/space/constants.ts@@ -21,6 +21,8 @@ export const industries = ["technology","non_profit","government",+ "legal",+ "sports_and_recreation","recruiting","real_estate","religious_organisation",@@ -240,6 +242,43 @@ export const industryKeywordRules: ReadonlyArray<{],industry: "arts_and_entertainment",},+ {+ keywords: [+ "law",+ "legal",+ "solicitors",+ "solicitor",+ "attorneys",+ "attorney",+ "barristers",+ "chambers",+ "notary",+ "llp",+ ],+ industry: "legal",+ },+ {+ keywords: [+ "sports",+ "sport",+ "athletic",+ "athletics",+ "fc",+ "football",+ "soccer",+ "rugby",+ "cricket",+ "hockey",+ "tennis",+ "golf",+ "rowing",+ "swimming",+ "gym",+ "fitness",+ "league",+ ],+ industry: "sports_and_recreation",+ },{keywords: ["consulting",@@ -249,11 +288,6 @@ export const industryKeywordRules: ReadonlyArray<{"advisors","accounting","accountants",- "law",- "legal",- "solicitors",- "attorneys",- "notary","architects","engineering","partners",diff --git a/apps/web/src/features/space/utils.test.ts b/apps/web/src/features/space/utils.test.tsindex 13de87a22..333e8ae63 100644--- a/apps/web/src/features/space/utils.test.ts+++ b/apps/web/src/features/space/utils.test.ts@@ -70,6 +70,19 @@ describe("inferIndustry", () => {).toBe("education");});+ it("infers legal and sports from the organization name", () => {+ expect(inferIndustry({ organizationName: "Smith & Jones LLP" })).toBe(+ "legal",+ );+ expect(inferIndustry({ organizationName: "Harbour Law" })).toBe("legal");+ expect(inferIndustry({ organizationName: "Riverside FC" })).toBe(+ "sports_and_recreation",+ );+ expect(inferIndustry({ organizationName: "Oakwood Tennis Club" })).toBe(+ "sports_and_recreation",+ );+ });+it("matches organization name keywords as whole words", () => {expect(inferIndustry({ organizationName: "Acme Software" })).toBe("technology",