-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feature/#28 personal profile
- Loading branch information
Showing
13 changed files
with
116 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { TeamTypes } from 'types/team'; | ||
import BaseAPI from './base.api'; | ||
|
||
import type { CustomAxiosRequestConfig } from './type'; | ||
|
||
class TeamsAPI extends BaseAPI { | ||
//https://apibora.shop/api/team/ | ||
checkTeamProfile(params: unknown) { | ||
return this.get<TeamTypes>(`/${params}`); | ||
} | ||
|
||
// editUser(params: unknown, body: UserEditForm, config: CustomAxiosRequestConfig) { | ||
// return this.put(`/${params}`, body, config); | ||
// } | ||
// kakaoOauth(body, config?: CustomAxiosRequestConfig) { | ||
// return this.post<PostOauthBody, PostOauthResponse>('kakao', body, { ...config }); | ||
// } | ||
// googleOauth(body, config?: CustomAxiosRequestConfig) { | ||
// return this.post<PostOauthBody, PostOauthResponse>('google', body, { ...config }); | ||
// } | ||
} | ||
|
||
export default new TeamsAPI('team'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
export const tabMenuArr = [ | ||
export const userTabMenuArr = [ | ||
{ id: 'post', name: '작업물', isActive: true }, | ||
{ id: 'scrap', name: '스크랩', isActive: false }, | ||
]; | ||
|
||
export const teamTabMenuArr = [ | ||
{ id: 'post', name: '작업물', isActive: true }, | ||
{ id: 'member', name: '멤버', isActive: false }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React, { ChangeEvent, Dispatch, SetStateAction, useCallback, useState } from 'react'; | ||
|
||
const useForm = <T>( | ||
initialData: T | ||
): [T, Dispatch<SetStateAction<T>>, (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void] => { | ||
const [values, setValues] = useState(initialData); | ||
const handler = useCallback( | ||
(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => { | ||
const { name, value } = e.target; | ||
setValues({ ...values, [name]: value }); | ||
}, | ||
[values, setValues] | ||
); | ||
|
||
return [values, setValues, handler]; | ||
}; | ||
|
||
export default useForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export interface TeamTypes { | ||
id: number; | ||
title: string; | ||
description: string; | ||
leader: number; | ||
teamProfileImage: string; | ||
backgroundImage: string; | ||
postCount: number; | ||
memberCount: number; | ||
teamFollowCount: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export interface User { | ||
id: number; | ||
id: string; | ||
email: string; | ||
nickname: string; | ||
description: string; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters