-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from boostcampwm-2024/frontend
ํ๋ก ํธ์๋ 4์ฃผ์ฐจ ๋ฐฐํฌ ์ฝ๋
- Loading branch information
Showing
96 changed files
with
3,320 additions
and
1,103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: 'Auto Assign Reviewers' | |
|
||
on: | ||
pull_request: | ||
types: [opened, labeled] | ||
types: [opened] | ||
|
||
jobs: | ||
assign_reviewers: | ||
|
@@ -43,12 +43,13 @@ jobs: | |
with: | ||
script: | | ||
const targetBranch = context.payload.pull_request.base.ref; | ||
const reviewers = targetBranch === 'main' ? 3 : 2; | ||
core.setOutput('number_of_reviewers', reviewers); | ||
const reviewers = (targetBranch === 'main' || targetBranch === 'development') ? 3 : 2; | ||
return { number_of_reviewers: reviewers }; | ||
- name: 'Assign Reviewers' | ||
uses: kentaro-m/[email protected] | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
configuration-path: '.github/auto_assign_config.yml' | ||
numberOfReviewers: ${{ steps.determine_reviewers.outputs.number_of_reviewers }} | ||
|
This file was deleted.
Oops, something went wrong.
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
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,67 +1,67 @@ | ||
{ | ||
"name": "ddara-frontend", | ||
"private": true, | ||
"workspaces": [ | ||
"frontend", | ||
"backend" | ||
], | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"test": "vitest", | ||
"test:watch": "vitest --watch", | ||
"test:coverage": "vitest run --coverage", | ||
"lint": "pnpm lint-staged", | ||
"preview": "vite preview", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build" | ||
}, | ||
"dependencies": { | ||
"@fontsource/pretendard": "^5.1.0", | ||
"axios": "^1.7.7", | ||
"lz-string": "^1.5.0", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-icons": "^5.3.0", | ||
"react-router-dom": "^6.28.0", | ||
"uuid": "^11.0.3" | ||
}, | ||
"devDependencies": { | ||
"@chromatic-com/storybook": "^3.2.2", | ||
"@eslint/js": "^9.13.0", | ||
"@storybook/addon-essentials": "^8.4.2", | ||
"@storybook/addon-interactions": "^8.4.2", | ||
"@storybook/addon-onboarding": "^8.4.2", | ||
"@storybook/blocks": "^8.4.2", | ||
"@storybook/react": "^8.4.2", | ||
"@storybook/react-vite": "^8.4.2", | ||
"@storybook/test": "^8.4.2", | ||
"@types/navermaps": "^3.7.8", | ||
"@types/react": "^18.3.12", | ||
"@types/react-dom": "^18.3.1", | ||
"@types/react-router-dom": "^5.3.3", | ||
"@vitejs/plugin-react-swc": "^3.5.0", | ||
"autoprefixer": "^10.4.20", | ||
"classnames": "^2.5.1", | ||
"eslint": "^9.13.0", | ||
"eslint-import-resolver-typescript": "^3.6.3", | ||
"eslint-plugin-react-hooks": "^5.0.0", | ||
"eslint-plugin-react-refresh": "^0.4.14", | ||
"eslint-plugin-storybook": "^0.11.0", | ||
"globals": "^15.11.0", | ||
"postcss": "^8.4.47", | ||
"storybook": "^8.4.2", | ||
"tailwindcss": "^3.4.14", | ||
"typescript": "~5.6.2", | ||
"typescript-eslint": "^8.11.0", | ||
"vite": "^5.4.10", | ||
"vite-tsconfig-paths": "^5.1.1" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"plugin:storybook/recommended" | ||
] | ||
} | ||
} | ||
{ | ||
"name": "ddara-frontend", | ||
"private": true, | ||
"workspaces": [ | ||
"frontend", | ||
"backend" | ||
], | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"test": "vitest", | ||
"test:watch": "vitest --watch", | ||
"test:coverage": "vitest run --coverage", | ||
"lint": "pnpm lint-staged", | ||
"preview": "vite preview", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build" | ||
}, | ||
"dependencies": { | ||
"@fontsource/pretendard": "^5.1.0", | ||
"axios": "^1.7.7", | ||
"lz-string": "^1.5.0", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-icons": "^5.3.0", | ||
"react-router-dom": "^6.28.0", | ||
"uuid": "^11.0.3" | ||
}, | ||
"devDependencies": { | ||
"@chromatic-com/storybook": "^3.2.2", | ||
"@eslint/js": "^9.13.0", | ||
"@storybook/addon-essentials": "^8.4.2", | ||
"@storybook/addon-interactions": "^8.4.2", | ||
"@storybook/addon-onboarding": "^8.4.2", | ||
"@storybook/blocks": "^8.4.2", | ||
"@storybook/react": "^8.4.2", | ||
"@storybook/react-vite": "^8.4.2", | ||
"@storybook/test": "^8.4.2", | ||
"@types/navermaps": "^3.7.8", | ||
"@types/react": "^18.3.12", | ||
"@types/react-dom": "^18.3.1", | ||
"@types/react-router-dom": "^5.3.3", | ||
"@vitejs/plugin-react-swc": "^3.5.0", | ||
"autoprefixer": "^10.4.20", | ||
"classnames": "^2.5.1", | ||
"eslint": "^9.13.0", | ||
"eslint-import-resolver-typescript": "^3.6.3", | ||
"eslint-plugin-react-hooks": "^5.0.0", | ||
"eslint-plugin-react-refresh": "^0.4.14", | ||
"eslint-plugin-storybook": "^0.11.0", | ||
"globals": "^15.11.0", | ||
"postcss": "^8.4.47", | ||
"storybook": "^8.4.2", | ||
"tailwindcss": "^3.4.14", | ||
"typescript": "~5.6.2", | ||
"typescript-eslint": "^8.11.0", | ||
"vite": "^5.4.10", | ||
"vite-tsconfig-paths": "^5.1.1" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"plugin:storybook/recommended" | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { getApiClient } from '@/api/client.api.ts'; | ||
import { ResponseDto } from '@/api/dto/response.dto.ts'; | ||
import { LoginResEntity, RegisterResEntity } from '@/api/dto/auth.dto.ts'; | ||
|
||
export const doLogin = (id: string, password: string): Promise<ResponseDto<LoginResEntity>> => { | ||
const promiseFn = ( | ||
fnResolve: (value: ResponseDto<LoginResEntity>) => void, | ||
fnReject: (reason?: any) => void, | ||
) => { | ||
const apiClient = getApiClient(); | ||
apiClient | ||
.post('/auth/login', { id, password }) | ||
.then(res => { | ||
if (res.status !== 200) { | ||
console.error(res); | ||
fnReject(`msg.${res}`); | ||
} else { | ||
fnResolve(new ResponseDto<LoginResEntity>(res)); | ||
} | ||
}) | ||
.catch(err => { | ||
console.error(err); | ||
fnReject('msg.RESULT_FAILED'); | ||
}); | ||
}; | ||
return new Promise(promiseFn); | ||
}; | ||
|
||
export const doRegister = ( | ||
id: string, | ||
name: string, | ||
password: string, | ||
email: string, | ||
): Promise<ResponseDto<RegisterResEntity>> => { | ||
const promiseFn = ( | ||
fnResolve: (value: ResponseDto<RegisterResEntity>) => void, | ||
fnReject: (reason?: any) => void, | ||
) => { | ||
const apiClient = getApiClient(); | ||
apiClient | ||
.post('/auth/register', { id, name, password, email }) | ||
.then(res => { | ||
if (res.status !== 200) { | ||
console.error(res); | ||
fnReject(`msg.${res}`); | ||
} else { | ||
fnResolve(new ResponseDto<RegisterResEntity>(res)); | ||
} | ||
}) | ||
.catch(err => { | ||
console.error(err); | ||
fnReject('msg.RESULT_FAILED'); | ||
}); | ||
}; | ||
return new Promise(promiseFn); | ||
}; |
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,57 @@ | ||
import { ResponseDto } from '@/api/dto/response.dto.ts'; | ||
import { | ||
createChannelReqEntity, | ||
createChannelResEntity, | ||
getUserChannelsResEntity, | ||
} from '@/api/dto/channel.dto.ts'; | ||
import { getApiClient } from '@/api/client.api.ts'; | ||
|
||
export const createChannel = ( | ||
data: createChannelReqEntity, | ||
): Promise<ResponseDto<createChannelResEntity>> => { | ||
const promiseFn = ( | ||
fnResolve: (value: ResponseDto<createChannelResEntity>) => void, | ||
fnReject: (reason?: any) => void, | ||
) => { | ||
const apiClient = getApiClient(); | ||
apiClient | ||
.post('/channel', data) | ||
.then(res => { | ||
if (res.status !== 200) { | ||
console.error(res); | ||
fnReject(`msg.${res}`); | ||
} else { | ||
fnResolve(new ResponseDto<createChannelResEntity>(res)); | ||
} | ||
}) | ||
.catch(err => { | ||
console.error(err); | ||
fnReject('msg.RESULT_FAILED'); | ||
}); | ||
}; | ||
return new Promise(promiseFn); | ||
}; | ||
|
||
export const getUserChannels = (userId: string): Promise<ResponseDto<getUserChannelsResEntity>> => { | ||
const promiseFn = ( | ||
fnResolve: (value: ResponseDto<getUserChannelsResEntity>) => void, | ||
fnReject: (reason?: any) => void, | ||
) => { | ||
const apiClient = getApiClient(); | ||
apiClient | ||
.get(`/channel/user/${userId}`) | ||
.then(res => { | ||
if (res.status !== 200) { | ||
console.error(res); | ||
fnReject(`msg.${res}`); | ||
} else { | ||
fnResolve(new ResponseDto<getUserChannelsResEntity>(res)); | ||
} | ||
}) | ||
.catch(err => { | ||
console.error(err); | ||
fnReject('msg.RESULT_FAILED'); | ||
}); | ||
}; | ||
return new Promise(promiseFn); | ||
}; |
Oops, something went wrong.