-
Notifications
You must be signed in to change notification settings - Fork 0
[refactor] 코드 개선 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "27-refactor-\uCF54\uB4DC-\uAC1C\uC120"
[refactor] 코드 개선 #28
Changes from all commits
a94783e
24ec4e3
c68c62e
29df347
32d4d63
760d719
095ae7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,22 +8,22 @@ import type { | |
| } from './entity'; | ||
|
|
||
| export const getChatRooms = async () => { | ||
| const response = await apiClient.get<ChatRoomsResponse>('/chats/rooms', { | ||
| const response = await apiClient.get<ChatRoomsResponse>('chats/rooms', { | ||
|
||
| requiresAuth: true, | ||
| }); | ||
| return response; | ||
| }; | ||
|
|
||
| export const postChatRooms = async (clubId: number) => { | ||
| const response = await apiClient.post<CreateChatRoomResponse>('/chats/rooms', { | ||
| const response = await apiClient.post<CreateChatRoomResponse>('chats/rooms', { | ||
| body: { clubId }, | ||
| requiresAuth: true, | ||
| }); | ||
| return response; | ||
| }; | ||
|
|
||
| export const postChatMessage = async (chatRoomId: number, content: string) => { | ||
| const response = await apiClient.post<ChatMessage>(`/chats/rooms/${chatRoomId}/messages`, { | ||
| const response = await apiClient.post<ChatMessage>(`chats/rooms/${chatRoomId}/messages`, { | ||
| body: { content }, | ||
| requiresAuth: true, | ||
| }); | ||
|
|
@@ -32,7 +32,7 @@ export const postChatMessage = async (chatRoomId: number, content: string) => { | |
|
|
||
| export const getChatMessages = async (params: ChatMessageRequestParam) => { | ||
| const response = await apiClient.get<ChatMessagesResponse, ChatMessageRequestParam>( | ||
| `/chats/rooms/${params.chatRoomId}`, | ||
| `chats/rooms/${params.chatRoomId}`, | ||
| { params, requiresAuth: true } | ||
| ); | ||
| return response; | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { Suspense } from 'react'; | ||
| import { Outlet } from 'react-router-dom'; | ||
| import { twMerge } from 'tailwind-merge'; | ||
| import BottomNav from './BottomNav'; | ||
| import Header from './Header'; | ||
|
|
||
| interface LayoutProps { | ||
| showBottomNav?: boolean; | ||
| contentClassName?: string; | ||
| } | ||
|
|
||
| export default function Layout({ showBottomNav = false, contentClassName }: LayoutProps) { | ||
| return ( | ||
| <div className="flex min-h-screen flex-col"> | ||
| <Header /> | ||
| <Suspense> | ||
| <main | ||
| className={twMerge( | ||
| 'bg-background flex flex-1 flex-col overflow-y-auto pt-11', | ||
| showBottomNav && 'pb-19', | ||
| contentClassName | ||
| )} | ||
| > | ||
| <Outlet /> | ||
| </main> | ||
| </Suspense> | ||
| {showBottomNav && <BottomNav />} | ||
| </div> | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the chats endpoints, the API paths have been changed to remove the leading slash. This pattern is repeated across multiple endpoints. Verify that this is intentional and consistent with the apiClient's base URL configuration to avoid broken API calls.