Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
wulaiyin789 authored and actions-user committed Jun 5, 2024
1 parent 81b349b commit ec91650
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/layout/CollectionDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CollectionDrawer = () => {
</Box>
<Box sx={collectionContentSx}>
{collections.map(({ name, list }, idx) => {
const collectionIdx = idx + 1
const collectionIdx = idx + 1;

return (
<Collection
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/collections/Collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ const Collection = ({ name, list, collectionIdx = null }: CollectionProps) => {
checked={list.includes(collectionDrawerRoute ?? "")}
onClick={() => {
if (collectionDrawerRoute && collectionIdx !== null) {
if(collectionIdx > 0) {
if (collectionIdx > 0) {
toggleCollectionEta(collectionDrawerRoute, collectionIdx - 1);
} else {
toggleCollectionEta(collectionDrawerRoute, null)
toggleCollectionEta(collectionDrawerRoute, null);
}
}
}}
Expand Down

0 comments on commit ec91650

Please sign in to comment.