Skip to content

Commit

Permalink
- Add chapter underline feedback when mouse hovered over ChapterTableRow
Browse files Browse the repository at this point in the history
  • Loading branch information
wintrmut3 authored and xgi committed Dec 19, 2023
1 parent 73cad5f commit 4766346
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
20 changes: 12 additions & 8 deletions src/components/library/ChapterTableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,27 @@ const ChapterTableRow: React.FC<Props> = (props: Props) => {
downloaderClient.start();
};

const [isHovered, setIsHovered] = React.useState(false);

const navigate = useNavigate();
const handleTableRowClicked = (rowPath: string) => {
console.log(rowPath);
navigate(rowPath);
};
const hoverEnter = () =>{
setIsHovered(true);
}
const hoverExit = () =>{
setIsHovered(false);
}


return (
<tr
key={chapter.id}
onContextMenu={props.handleContextMenu}
onClick={() => handleTableRowClicked(`${routes.READER}/${series.id}/${chapter.id}`)}
onMouseEnter={()=> hoverEnter()}
onMouseLeave={()=> hoverExit()}
>
<td>
<ActionIcon
Expand Down Expand Up @@ -98,7 +108,7 @@ const ChapterTableRow: React.FC<Props> = (props: Props) => {
</div>
)}
</td>
<td>{chapter.title}</td>
<td>{isHovered? <u> {chapter.title} </u> : chapter.title}</td>
<td>
<Text lineClamp={1}>{chapter.groupName}</Text>
</td>
Expand All @@ -110,12 +120,6 @@ const ChapterTableRow: React.FC<Props> = (props: Props) => {
</td>
<td>
<Group position="right" spacing="xs" noWrap>
{/* <Link to={`${routes.READER}/${series.id}/${chapter.id}`}>
<Button variant="default" size="xs">
Read Me
</Button>
</Link> */}

{chapterDownloadStatuses[chapter.id!] ? (

Check warning on line 123 in src/components/library/ChapterTableRow.tsx

View workflow job for this annotation

GitHub Actions / build (18, macos-latest)

Forbidden non-null assertion
<ActionIcon disabled>
<IconFileCheck size={16} />
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8882,6 +8882,11 @@ xmlbuilder@>=11.0.1, xmlbuilder@^15.1.1:
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5"
integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==

xmlbuilder@^9.0.7:
version "9.0.7"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=

xmlchars@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
Expand Down Expand Up @@ -8912,7 +8917,7 @@ yargs-parser@^20.2.2:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==

yargs-parser@^21.1.1:
yargs-parser@^21.0.0, yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
Expand Down

0 comments on commit 4766346

Please sign in to comment.