mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Update resource card to use anchor tag for navigation
This commit is contained in:
@@ -12,9 +12,11 @@ export default function ResourceCard({ resource }: { resource: Resource }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={"p-2 cursor-pointer"}
|
||||
onClick={() => {
|
||||
<a
|
||||
href={`/resources/${resource.id}`}
|
||||
className={"p-2 cursor-pointer block"}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
navigate(`/resources/${resource.id}`);
|
||||
}}
|
||||
>
|
||||
@@ -55,6 +57,6 @@ export default function ResourceCard({ resource }: { resource: Resource }) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user