mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-30 04:24:26 +01:00
Merge branch 'dev' into feature/tournament-pages
This commit is contained in:
@@ -12,25 +12,19 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function ProjectCardMini({ project, onClick }: Props) {
|
||||
const { vote } = useVote({
|
||||
itemId: project.id,
|
||||
itemType: Vote_Item_Type.Project
|
||||
});
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
className="py-16 select-none px-16 flex items-center gap-16 border-2 border-gray-100 rounded-16 bg-white hover:bg-gray-50"
|
||||
onKeyDown={e => {
|
||||
console.log(e.key);
|
||||
e.key !== 'Enter' || onClick(project.id)
|
||||
}}
|
||||
onClick={(e) => { e.currentTarget.focus(); onClick(project.id) }}
|
||||
tabIndex={0}
|
||||
role='button'
|
||||
>
|
||||
<img src={project.thumbnail_image} alt={project.title} onClick={() => onClick(project.id)} draggable="false" className="flex-shrink-0 w-64 h-64 bg-gray-200 border-0 rounded-full hover:cursor-pointer"></img>
|
||||
<img src={project.thumbnail_image} alt={project.title} draggable="false" className="flex-shrink-0 w-64 h-64 bg-gray-200 border-0 rounded-full hover:cursor-pointer"></img>
|
||||
<div className="justify-around items-start min-w-0 flex-1 hover:cursor-pointer"
|
||||
onClick={() => onClick(project.id)}
|
||||
role='button'
|
||||
>
|
||||
<p className="text-body4 w-full font-bold overflow-ellipsis overflow-hidden whitespace-nowrap">{project.title}</p>
|
||||
<p className="text-body5 text-gray-600 font-light my-[5px]">{project.category.title}</p>
|
||||
|
||||
@@ -3,9 +3,10 @@ import ProjectsRow from "../ProjectsRow/ProjectsRow";
|
||||
import ProjectsRowSkeleton from "../ProjectsRow/ProjectsRow.Skeleton";
|
||||
import { MdLocalFireDepartment } from "react-icons/md";
|
||||
import { useExploreProjectsQuery } from "src/graphql";
|
||||
import React from "react";
|
||||
|
||||
|
||||
export default function ProjectsSection() {
|
||||
function ProjectsSection() {
|
||||
|
||||
const { data, loading } = useExploreProjectsQuery();
|
||||
|
||||
@@ -42,3 +43,5 @@ export default function ProjectsSection() {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default React.memo(ProjectsSection)
|
||||
Reference in New Issue
Block a user