diff --git a/.env b/.env new file mode 100644 index 00000000..cecee240 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +NEXT_PUBLIC_BASE_URL = "https://dev.api.listywave.com" \ No newline at end of file diff --git a/src/app/[userNickname]/collabolist/page.tsx b/src/app/[userNickname]/collabolist/page.tsx index 02058891..7e772a2d 100644 --- a/src/app/[userNickname]/collabolist/page.tsx +++ b/src/app/[userNickname]/collabolist/page.tsx @@ -5,7 +5,7 @@ - [ ] 반응형 UI 구현 */ -import '@/styles/globalStyles.css'; +import '@/styles/GlobalStyles.css'; import { USER_DATA_ME } from '../mockData/user'; // 삭제 예정 diff --git a/src/app/[userNickname]/mylist/page.tsx b/src/app/[userNickname]/mylist/page.tsx index d4feb866..7a30978e 100644 --- a/src/app/[userNickname]/mylist/page.tsx +++ b/src/app/[userNickname]/mylist/page.tsx @@ -5,7 +5,7 @@ - [ ] 반응형 UI 구현 */ -import '@/styles/globalStyles.css'; +import '@/styles/GlobalStyles.css'; import { USER_DATA_ME } from '../mockData/user'; // 삭제 예정 diff --git a/src/app/_api/category/getCategories.ts b/src/app/_api/category/getCategories.ts index 637001e9..816c8f7d 100644 --- a/src/app/_api/category/getCategories.ts +++ b/src/app/_api/category/getCategories.ts @@ -1,8 +1,8 @@ import axiosInstance from '@/lib/axios/axiosInstance'; -import { CategoriesType } from '@/lib/types/categoriesType'; +import { CategoryType } from '@/lib/types/categoriesType'; export const getCategories = async () => { - const response = await axiosInstance.get('/categories'); + const response = await axiosInstance.get('/categories'); return response.data; }; diff --git a/src/app/_api/list/createList.ts b/src/app/_api/list/createList.ts index 99d78ac3..28e0a8dc 100644 --- a/src/app/_api/list/createList.ts +++ b/src/app/_api/list/createList.ts @@ -1 +1,8 @@ -// 리스트 생성 api +import axiosInstance from '@/lib/axios/axiosInstance'; +import { ListCreateType } from '@/lib/types/listType'; + +export const createList = async (data: ListCreateType) => { + const response = await axiosInstance.post('/lists', data); + + return response.data; +}; diff --git a/src/app/_api/user/getUsers.ts b/src/app/_api/user/getUsers.ts new file mode 100644 index 00000000..73b94d11 --- /dev/null +++ b/src/app/_api/user/getUsers.ts @@ -0,0 +1,8 @@ +import axiosInstance from '@/lib/axios/axiosInstance'; +import { UserProfilesType } from '@/lib/types/userProfileType'; + +export const getUsers = async () => { + const response = await axiosInstance.get('/users'); + + return response.data; +}; diff --git a/src/app/create/_components/CreateItem.tsx b/src/app/create/_components/CreateItem.tsx index 7cd378e6..7b1f3095 100644 --- a/src/app/create/_components/CreateItem.tsx +++ b/src/app/create/_components/CreateItem.tsx @@ -1,14 +1,15 @@ import { useFormContext } from 'react-hook-form'; import BackIcon from '/public/icons/back.svg'; -import Items from './Items'; +import Items from './item/Items'; import * as styles from './CreateItem.css'; interface CreateItemProps { onBackClick: () => void; + onSubmit: () => void; } -export default function CreateItem({ onBackClick }: CreateItemProps) { +export default function CreateItem({ onBackClick, onSubmit }: CreateItemProps) { const { formState: { isValid }, } = useFormContext(); @@ -21,9 +22,7 @@ export default function CreateItem({ onBackClick }: CreateItemProps) {

리스트 생성

- +
- {/* 제목 */} -
-
- 타이틀 * -
-
-
- - { - setValue('title', ''); - }} - /> - {errors.title &&
{errors.title.message?.toString()}
} -
-
-
- - {/* 한 줄 소개 */} -
-
소개
-
-
-