Skip to content

Commit

Permalink
chore: staged changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rayriffy committed Sep 8, 2022
1 parent 52da9f5 commit d6de989
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/core/components/pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FunctionComponent, memo } from 'react'
import { memo } from 'react'

import Link from 'next/link'

Expand All @@ -21,7 +21,7 @@ const Page = memo<PageProps>(props => {

return (
<div
className={`cursor-pointer ${
className={`cursor-pointer p-1 border rounded-md h-full aspect-square text-center ${
startPoint + i + 1 === current ? 'text-gray-900' : 'text-gray-500'
}`}
onClick={() => onChange(startPoint + i + 1)}
Expand All @@ -45,11 +45,11 @@ export const Pagination = memo<Props>(props => {
: 0

return (
<div className="flex justify-center py-5">
<div className="flex justify-center py-8 space-x-6 sm:space-x-8">
{Array.from({ length: pageLength }, (_, i) => (
<div
key={`pagination-${startPoint + i}`}
className="px-4 text-md sm:text-lg"
className="text-md sm:text-lg"
>
{link ? (
<Link
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[page].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Page: NextPage = props => {
<div className="my-1">
<h2 className="text-sm font-semibold">
{(data.count ?? -1).toLocaleString()} images found, with a total
of {data.paginate.max.toLocaleString()} pages
of {data.paginate.max.toLocaleString()} pages
</h2>
</div>
<Pagination {...data.paginate} />
Expand Down
3 changes: 0 additions & 3 deletions src/pages/api/pixivProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import path from 'path'

import { NextApiHandler } from 'next'

import { last } from 'lodash'

const cacheDirectory = path.join(process.cwd(), '.next/cache/pixivProxy')

const api: NextApiHandler = async (req, res) => {
Expand Down Expand Up @@ -32,7 +30,6 @@ const api: NextApiHandler = async (req, res) => {

res.end()
} catch (e) {
console.log(e)
res.status(500).send('Internal Server Error')
res.end()
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/tagSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const api: NextApiHandler = async (req, res) => {
tags: processedTags.filter(tag =>
query.length === 0
? true
: tag.name.original.includes(query) ||
: tag.name.original.toLowerCase().includes(query.toLowerCase()) ||
(tag.name.translated ?? '')
.toLowerCase()
.includes(query.toLowerCase())
Expand Down

0 comments on commit d6de989

Please sign in to comment.