Skip to content

Commit

Permalink
Merge pull request #171 from themoment-team/develop
Browse files Browse the repository at this point in the history
Release v1.7.0
  • Loading branch information
frorong committed Jul 10, 2024
2 parents 1dcc988 + 1efde70 commit c2d7ef6
Show file tree
Hide file tree
Showing 138 changed files with 2,650 additions and 466 deletions.
34 changes: 17 additions & 17 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ const preview: Preview = {
color: /(background|color)$/i,
date: /Date$/,
},
backgrounds: {
default: 'default',
values: [
{
name: 'default',
value: '#F5F6F8',
},
{
name: 'light',
value: '#ffffff',
},
{
name: 'dark',
value: '#050505',
},
],
},
},
backgrounds: {
default: 'default',
values: [
{
name: 'default',
value: '#F5F6F8',
},
{
name: 'light',
value: '#ffffff',
},
{
name: 'dark',
value: '#050505',
},
],
},
nextjs: {
appDirectory: true,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
"eslint": "8.48.0",
"eslint-config-next": "^13.5.2",
"firebase": "^10.3.1",
"next": "^14.0.1",
"next": "~14.0.2",
"next-view-transitions": "^0.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-easy-crop": "^5.0.6",
"react-hook-form": "^7.46.1",
"react-kakao-maps-sdk": "^1.1.27",
"react-toastify": "^9.1.3",
"typescript": "5.2.2",
"zod": "^3.21.4"
Expand Down
109 changes: 69 additions & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/images/GNMarker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/apis/board/getBoardDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cookies } from 'next/headers';
import { redirect } from 'next/navigation';

import { boardUrl } from '@/libs';
import type { BoardType } from '@/types';
import type { BoardResponseType } from '@/types';

const AUTH_REFRESH_PATH = '/auth/refresh' as const;

Expand All @@ -14,7 +14,7 @@ const AUTH_REFRESH_PATH = '/auth/refresh' as const;
export const getBoardDetail = async (
redirectUrl: string,
boardId: string
): Promise<BoardType | null> => {
): Promise<BoardResponseType | null> => {
const accessToken = cookies().get('accessToken')?.value;

if (!accessToken)
Expand Down
11 changes: 8 additions & 3 deletions src/apis/board/getBoardList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ import { cookies } from 'next/headers';
import { redirect } from 'next/navigation';

import { boardUrl } from '@/libs';
import type { BoardInfoType } from '@/types';
import type { BoardInfoType, CategoryType } from '@/types';

export const getBoardList = async (): Promise<BoardInfoType[]> => {
export const getBoardList = async (
category?: CategoryType
): Promise<BoardInfoType[]> => {
const accessToken = cookies().get('accessToken')?.value;

if (!accessToken) return redirect('/auth/refresh');

const response = await fetch(
new URL(`/api/v1${boardUrl.getBoardList(0)}`, process.env.BASE_URL),
new URL(
`/api/v1${boardUrl.getBoardList(0, category)}`,
process.env.BASE_URL
),
{
method: 'GET',
headers: { Cookie: `accessToken=${accessToken}` },
Expand Down
1 change: 1 addition & 0 deletions src/apis/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './board';
export * from './map';
export * from './mentee';
export * from './mentor';
export * from './teacher';
Loading

0 comments on commit c2d7ef6

Please sign in to comment.