Skip to content

Commit

Permalink
[fix] 데이터 없을 때 오류 픽스
Browse files Browse the repository at this point in the history
  • Loading branch information
euije committed Mar 13, 2024
1 parent 9f27195 commit 76d16eb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import '@/styles/globals.css';
import { StyledComponentsRegistry } from '@/component/Provider/StyledComponentsRegistry';
import { ReactQueryClientProvider } from '@/component/Provider/ReactQueryClientProvider';
import { PrimerStyleProvider } from '@/component/Provider/PrimerStyleProvider';
import { WEB_URL } from '@/util/string';

export const metadata: Metadata = {
metadataBase: new URL(WEB_URL!),
title: 'YELL:O - 너의 [ ??? ]에 설렜어',
description:
'YELLO (옐로)는 특정 그룹 및 대학교에 소속된 친구들과 함께 즐길 수 있는 익명기반 투표 서비스 입니다.',
Expand Down
9 changes: 7 additions & 2 deletions app/school-attack/[[...groupId]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,10 @@ export default function Page() {
}}
/>
</section>
<section className='px-5 flex flex-col items-center my-3'>
<section className='px-5 flex flex-col my-3'>
<Subtitle_02 className='ml-1 my-6 text-white'>
{'실시간 댓글'}
</Subtitle_02>
{commentQuery.isLoading ? (
<Spinner />
) : (
Expand Down Expand Up @@ -585,7 +588,7 @@ export default function Page() {
<div className='w-full mb-28'>
{commentQuery.isLoading ? (
<Spinner />
) : (
) : commentQuery.data?.data.postCommentList?.length || 0 > 0 ? (
<Pagination
marginPageCount={0}
// eslint-disable-next-line
Expand All @@ -606,6 +609,8 @@ export default function Page() {
narrow: true,
}}
/>
) : (
<></>
)}
</div>
</MainLayout>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"homepage": "http://yelloworld.shop",
"scripts": {
"dev": "next dev --turbo",
"dev": "next dev",
"build": "NODE_ENV=production next build",
"start": "next start",
"lint": "next lint",
Expand Down
3 changes: 1 addition & 2 deletions repository/statistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import {
GetSchoolAttackStatistics,
SchoolAttackStatistics,
} from './schema';

const BASE_URL = process.env.NEXT_PUBLIC_SERVER_URL;
import { BASE_URL } from '@/util/string';

export const getSchoolAttackStatistics = async (page: number) => {
return await axios<BaseResponse<GetSchoolAttackStatistics>>({
Expand Down
1 change: 1 addition & 0 deletions util/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ export const MUTATION_KEY = {
};

export const BASE_URL = process.env.NEXT_PUBLIC_SERVER_URL;
export const WEB_URL = process.env.NEXT_PUBLIC_WEB_URL;

0 comments on commit 76d16eb

Please sign in to comment.