Skip to content

Commit

Permalink
chore: 경로 변경 및 페이지네이션 오류 해결 (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeyounging authored Jun 12, 2024
1 parent 7f3d303 commit affc820
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/blog/[blogId]/components/Board/BoardContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function BoardContent({
const { postItems, totalPage } = useBoardContext();

return (
<div className="px-100">
<div className="px-100 py-20">
<header className="flex flex-row items-center justify-between w-full pr-10">
<div className="flex flex-col justify-center items-center">
<div className="font-extrabold text-4xl">Stories</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/blog/[blogId]/components/Board/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BoardFetcher } from '../BlogFetcher';
import BoardContent from './BoardContent';

export default function Board({ blogId }: { blogId: number }) {
const [page, setPage] = useState<number>(0);
const [page, setPage] = useState<number>(1);

return (
<BoardFetcher blogId={blogId} page={page}>
Expand Down
5 changes: 4 additions & 1 deletion src/components/MouseImageGallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Image from 'next/image';
import Link from 'next/link';
import { MouseEvent, useRef } from 'react';
import { range } from '@/utils';
import Cookies from 'js-cookie';
import { BLOG_ID } from '@/constants';
import { LikeIcon, Mypage, Trending, Write } from '../Common';

export default function MouseImageGallery() {
Expand All @@ -13,6 +15,7 @@ export default function MouseImageGallery() {
const maxNumberOfImages = 10;
// eslint-disable-next-line
const refs: any[] = [];
const blogId = Cookies.get(BLOG_ID) as string;

const getCurrentImages = () => {
const images = [];
Expand Down Expand Up @@ -100,7 +103,7 @@ export default function MouseImageGallery() {
<LikeIcon color="#000" />
</Link>

<Link href="/mypage" className="flex gap-10 z-[100]">
<Link href={`/blog/${blogId}`} className="flex gap-10 z-[100]">
<Mypage />
</Link>

Expand Down

0 comments on commit affc820

Please sign in to comment.