Skip to content

Commit

Permalink
fix: improve link accessibility by using anchor tags instead of div
Browse files Browse the repository at this point in the history
  • Loading branch information
thexayotbe committed Jan 26, 2025
1 parent b14df8c commit 36d2b14
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/dashboard/Links.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import universityResources from "@/lib/links/universityResources";

const Links = () => {
const navigation = (link: string) => {
window.open(link, "_blank");
};
return (
<div className="px-4 py-8">
<h3 className="my-8 text-3xl font-medium">All University Services</h3>
<div className="grid gap-5 @4xl/content:grid-cols-2">
{universityResources.map((resource, index) => (
<div
<a
href={resource.url}
target="_blank"
key={index}
className="flex h-[150px] cursor-pointer flex-row gap-6 rounded-2xl bg-primary px-4 py-6 transition-all ease-in-out hover:bg-primary-hover"
onClick={() => navigation(resource.url)}
>
<div className="w-10">
<span
Expand All @@ -27,7 +25,7 @@ const Links = () => {
{resource.description && <p>{resource.description}</p>}
</p>
</div>
</div>
</a>
))}
</div>
</div>
Expand Down

0 comments on commit 36d2b14

Please sign in to comment.