Skip to content

Conversation

@BorDevTech
Copy link
Contributor

This pull request introduces several improvements and refactors across multiple pages and API routes, focusing on code consistency, UI enhancements, and better resource management. The most significant changes include UI updates for the Contact and Services pages, improved icon usage, and the addition of a new resources file for API search functionality.

UI and Component Improvements

  • Refactored the Contact page (app/(Pages)/contact/page.tsx) to use consistent import styles, improved the rendering of social links and contact information by introducing the custom Icon component, and enhanced accessibility and layout for both desktop and mobile views. [1] [2] [3] [4] [5] [6] [7] [8] [9]

  • Updated the Services page (app/(Pages)/services/page.tsx) to use Chakra UI's SimpleGrid for better responsive layouts, streamlined the rendering of service and support cards, and improved the structure and readability of the page. [1] [2] [3] [4] [5]

  • Modernized the Home page (app/page.tsx) by updating import styles, replacing the icon in the "Learn More" button with the custom Icon component, and improving text formatting for clarity and consistency. [1] [2]

API and Resource Management

  • Added a new resources.json file (app/(API Routes)/api/search/resources.json) containing various resource links for re-entry, employment, housing, and crisis management, supporting API-based resource searches.

  • Introduced comments and documentation in API route files to clarify their purpose, including a catch-all search route and a dynamic state resource route. (app/(API Routes)/api/search/route.tsR1-R8, app/(API Routes)/api/search/[state]/route.tsR1)

  • Updated the file path construction in the blog search API route (app/(API Routes)/api/blog/search/route.ts) to remove the unnecessary "src" directory, improving compatibility with deployment environments.

@BorDevTech BorDevTech added the enhancement New feature or request label Jan 15, 2026
@BorDevTech BorDevTech marked this pull request as ready for review January 15, 2026 22:44
Copilot AI review requested due to automatic review settings January 15, 2026 22:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a centralized icon registry system and refactors icon usage throughout the application. The changes aim to standardize how icons are referenced and rendered across pages and components, moving from direct component imports to a string-based registry lookup system.

Changes:

  • Created a new icon registry system with a centralized Icon component that uses string-based icon names instead of direct component references
  • Refactored multiple data files and components to use the new IconName type instead of React.ComponentType or ReactNode
  • Updated Contact, Services, and Home pages to use the new Icon component
  • Added experimental optimization for Chakra UI package imports in Next.js config

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
next.config.ts Adds experimental package import optimization for Chakra UI
data/services.ts Updates icon references from component imports to string-based IconName type
data/get-involved.tsx Refactors icon type from ReactNode to IconName
data/empowerment.tsx Changes icon type to use string-based IconName
data/contact.tsx Updates SocialLink interface to use IconName for platform field
components/ui/icons/index.ts Changes from named exports to direct re-exports of React Icons
components/ui/icons/icon.tsx Creates new Icon wrapper component for centralized icon rendering
components/ui/icons/icon-registry.tsx Establishes centralized icon registry mapping string names to components
components/services/support-card.tsx Updates to use new Icon component with name prop
components/services/service-card.tsx Refactors to use Icon component and adds Chakra UI Card styling
components/services/faq-item.tsx Updates to use Icon component for Plus/Minus icons
components/home/feature-card.tsx Changes icon prop type to IconName and uses Icon component
components/common/iconbutton.tsx Adds new (unused) IconButton component
components/common/footer.tsx Updates all icon usage to new Icon component with string names
app/page.tsx Refactors to use Icon component for ArrowRight icons
app/(Pages)/services/page.tsx Adds SimpleGrid for responsive layout and removes duplicate sections
app/(Pages)/contact/page.tsx Updates to use Icon component for social links and adds IconButton usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

top={255}
/>
<Heading as={"h4"}>{title}</Heading>
<h4>{title}</h4>
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate title rendering. The title is rendered twice on consecutive lines - once as a Chakra UI Heading component and once as a plain h4 element. Remove the duplicate h4 element on line 40.

Suggested change
<h4>{title}</h4>

Copilot uses AI. Check for mistakes.
Comment on lines 32 to 84

<Icon name={link.platform} size={10} />
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate Icon components. The same icon is rendered twice on consecutive lines (82 and 84) within the IconButton. Remove the duplicate Icon on line 84.

Suggested change
<Icon name={link.platform} size={10} />

Copilot uses AI. Check for mistakes.
Comment on lines 50 to 63
<div>
{socialLinks.map((link) => (
<a
key={link.platform}
href={link.url}
target="_blank"
rel="noopener noreferrer"
aria-label={`Visit our ${link.platform} page`}
>
<Icon name={link.platform} size={10} />
<span>{link.platform}</span>
</a>
))}
</div>
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate social links sections. The social links are rendered in two separate sections (lines 50-63 and lines 64-89) with different styling but the same content. This appears to be leftover code from refactoring. Remove the duplicate section that is not intended to be displayed.

Suggested change
<div>
{socialLinks.map((link) => (
<a
key={link.platform}
href={link.url}
target="_blank"
rel="noopener noreferrer"
aria-label={`Visit our ${link.platform} page`}
>
<Icon name={link.platform} size={10} />
<span>{link.platform}</span>
</a>
))}
</div>

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 14
//Create a reusable IconButton component that takes in link, platform, url, and icon as props and renders an anchor tag with the provided icon.
// & React.ComponentProps<typeof ChakraIcon>

export default function IconButton({
link,
platform,
url,
icon,
}: {
link: string;
platform: string;
url: string;
icon: React.ReactNode;
}) {
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused component and parameter. This IconButton component is never imported or used anywhere in the codebase. Additionally, the link parameter in the function signature is defined but never used in the component body. Either remove this entire file if it's not needed, or remove the unused link parameter if the component will be used in the future.

Copilot uses AI. Check for mistakes.
Comment on lines 3 to 11
import { Icon as ChakraIcon } from "@chakra-ui/react";

export type IconName = keyof typeof iconRegistry;

type IconProps = {
name: IconName;
size?: number;
color?: string;
} & React.ComponentProps<typeof ChakraIcon>;
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate type export. The IconName type is exported in both icon.tsx (line 5) and icon-registry.tsx (line 30). This creates a duplicate export that could lead to confusion. Remove the export from icon.tsx and import it from icon-registry.tsx instead to maintain a single source of truth.

Suggested change
import { Icon as ChakraIcon } from "@chakra-ui/react";
export type IconName = keyof typeof iconRegistry;
type IconProps = {
name: IconName;
size?: number;
color?: string;
} & React.ComponentProps<typeof ChakraIcon>;
import type { IconName } from "./icon-registry";
import { Icon as ChakraIcon } from "@chakra-ui/react";
type IconProps = {
name: IconName;
size?: number;
color?: string;
} & React.ComponentProps<typeof ChakraIcon>;

Copilot uses AI. Check for mistakes.
…e; update social links rendering and integrate Chakra UI components for consistency; enhance resource data structure in JSON; update dependencies to latest versions.
…ce form submission feedback with toaster notifications; improve layout and reset functionality.
… Chakra UI integration; remove old Search component for improved structure and maintainability.
…ion; integrate team member cards and enhance layout with Chakra UI components.
@BorDevTech
Copy link
Contributor Author

@copilot re-review

Copy link
Contributor

Copilot AI commented Jan 20, 2026

@BorDevTech I've opened a new pull request, #43, to work on those changes. Once the pull request is ready, I'll request review from you.

[WIP] Implement icon registry and update API search page
@BorDevTech BorDevTech marked this pull request as draft January 20, 2026 04:45
@BorDevTech BorDevTech marked this pull request as ready for review January 20, 2026 04:45
@BorDevTech BorDevTech requested a review from Copilot January 20, 2026 04:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 33 changed files in this pull request and generated 17 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 2 to 6
import { iconRegistry } from "./icon-registry";
import { Icon as ChakraIcon } from "@chakra-ui/react";

export type IconName = keyof typeof iconRegistry;

Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type IconName is duplicated here and also exported from icon-registry.tsx. This creates ambiguity about which import to use. Consider removing this duplicate type definition and importing IconName from icon-registry instead to maintain a single source of truth.

Suggested change
import { iconRegistry } from "./icon-registry";
import { Icon as ChakraIcon } from "@chakra-ui/react";
export type IconName = keyof typeof iconRegistry;
import { iconRegistry, IconName } from "./icon-registry";
import { Icon as ChakraIcon } from "@chakra-ui/react";

Copilot uses AI. Check for mistakes.
Image as ChakraImage,
Card,
} from "@chakra-ui/react";
import { poppins } from "../../../components/ui/fonts";
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import poppins.

Suggested change
import { poppins } from "../../../components/ui/fonts";

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
BorDevTech and others added 12 commits January 19, 2026 23:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… implement strong typing in TypeScript, and enhance search functionality with region and category filters using Chakra UI components.
…ports in ContactForm, and streamline FeatureCard component imports
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 36 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +25
// Create a reusable IconButton component that takes in link, platform, url, and icon as props and renders an anchor tag with the provided icon.
// & React.ComponentProps<typeof ChakraIcon>

export default function IconButton({
link,
platform,
url,
icon,
}: {
link: string;
platform: string;
url: string;
icon: React.ReactNode;
}) {
return (
<a
href={url}
target="_blank"
rel="noopener noreferrer"
aria-label={`Visit our ${platform} page`}
>
{icon}
</a>
);
}
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IconButton component is created but not used anywhere in the codebase. Consider removing this file or implementing its usage if it was intended for the icon refactor.

Suggested change
// Create a reusable IconButton component that takes in link, platform, url, and icon as props and renders an anchor tag with the provided icon.
// & React.ComponentProps<typeof ChakraIcon>
export default function IconButton({
link,
platform,
url,
icon,
}: {
link: string;
platform: string;
url: string;
icon: React.ReactNode;
}) {
return (
<a
href={url}
target="_blank"
rel="noopener noreferrer"
aria-label={`Visit our ${platform} page`}
>
{icon}
</a>
);
}
// This file previously contained an IconButton React component that was not used
// anywhere in the codebase. It has been removed to eliminate dead code.
// Explicitly mark this file as a module with no exports.
export {};

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +10
link,
platform,
url,
icon,
}: {
link: string;
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link parameter is defined but never used in this component. Remove the unused parameter or implement its intended functionality.

Suggested change
link,
platform,
url,
icon,
}: {
link: string;
platform,
url,
icon,
}: {

Copilot uses AI. Check for mistakes.
const [isSubmitting, setIsSubmitting] = useState(false);
const [status, setStatus] = useState<SubmissionStatus>({ type: null, message: '' });
const submitToasterId = "contact-form-submission";
const [showToast, setShowToast] = useState(false);
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable declaration. The showToast state is set but never used. Remove this unused state or implement its intended functionality.

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +65
const [toastMessage, setToastMessage] = useState({
error: () => "",
loading: () =>
toaster.loading({
id: submitToasterId,
title: "Submitting form",
description: "Please wait while we submit your message.",
type: "info",
closable: true,
}),
update: () => "",
updateSuccess: () =>
toaster.update(submitToasterId, {
title: "Form submitted",
description: "Your message has been sent successfully.",
type: "success",
duration: 3000,
closable: true,
}),
reset: () =>
toaster.create({
title: "Form reset",
description: "The contact form has been cleared.",
type: "info",
closable: true,
}),
});
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toastMessage object contains unused properties (error and update). These functions are defined but never called. Remove unused functions or implement their intended functionality.

Copilot uses AI. Check for mistakes.
import { Tooltip } from "@/components/ui/tooltip";
export default function SearchResources() {
//Retrieve mock data from json file
const [searchlist, setSearchlist] = useState(null);
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable setSearchlist.

Suggested change
const [searchlist, setSearchlist] = useState(null);
const [searchlist] = useState(null);

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 36 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to +6
// export type IconName = keyof typeof iconRegistry;

Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code. This export type comment should either be removed entirely or the actual export should be uncommented and used, but keeping commented code reduces code cleanliness.

Suggested change
// export type IconName = keyof typeof iconRegistry;

Copilot uses AI. Check for mistakes.
@@ -1,17 +1,20 @@
import { IconName } from "../ui/icons/icon";
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import. The IconName type is imported but never used in this file since the icon prop type is defined inline as icon: IconName.

Suggested change
import { IconName } from "../ui/icons/icon";
import type { IconName } from "../ui/icons/icon";

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,25 @@
// Create a reusable IconButton component that takes in link, platform, url, and icon as props and renders an anchor tag with the provided icon.
// & React.ComponentProps<typeof ChakraIcon>
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code. Lines 1-4 contain a comment about the component's purpose, but the implementation doesn't match the described interface. Either update the comment to reflect the actual implementation or remove it entirely.

Suggested change
// & React.ComponentProps<typeof ChakraIcon>

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +17
link: string;
platform: string;
url: string;
icon: React.ReactNode;
}) {
return (
<a
href={url}
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link parameter is defined but never used in this component. Consider removing it from the props interface or using it for the href attribute if that was the intention.

Suggested change
link: string;
platform: string;
url: string;
icon: React.ReactNode;
}) {
return (
<a
href={url}
link?: string;
platform: string;
url: string;
icon: React.ReactNode;
}) {
return (
<a
href={link ?? url}

Copilot uses AI. Check for mistakes.
const [isSubmitting, setIsSubmitting] = useState(false);
const [status, setStatus] = useState<SubmissionStatus>({ type: null, message: '' });
const submitToasterId = "contact-form-submission";
const [showToast, setShowToast] = useState(false);
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable showToast.

Suggested change
const [showToast, setShowToast] = useState(false);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

2 participants