-
Notifications
You must be signed in to change notification settings - Fork 93
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
[12팀 하정원] 프레임워크 없이 SPA 만들기 #16
Closed
Closed
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
01db11c
config: add .prettierrc
JayeHa 4eb4790
feat: App.ts 추가 및 Typescript로의 전환
JayeHa 4b9c94c
feat: Router 추가
JayeHa b127c7e
refactor: 페이지 컴포넌트를 BasePage 클래스로 통합
JayeHa 99ee351
feat: Header 컴포넌트 추가 (4. 컴포넌트 기반 구조 설계)
JayeHa 95b9af7
feat: localStorage 추가
JayeHa 8214b4b
refactor: BaseComponent에 abstract 추가
JayeHa 25b641a
feat: 로그인, 로그아웃 구현
JayeHa 81247da
refactor: BasePage 컴포넌트를 BaseComponent로 통합
JayeHa 360155f
feat: 프로필 수정기능 추가
JayeHa b2075c7
refactor: BaseComponent 리펙토링
JayeHa 6e73ee7
refactor: 폴더구조 변경
JayeHa e0a6432
fix: 잘못된 셀프 클로징 div 태그 수정 (header container 관련)
JayeHa 962c1d1
fix: `beforeRender` 메서드 추가
JayeHa f528115
chore: delete README.md
JayeHa 28d664d
feat: Footer 컴포넌트 추가
JayeHa 0c8735e
feat(home): 동적 컨텐츠 렌더링
JayeHa 1d267cf
refactor: 상태 변경 함수(setState) 구현
JayeHa 8b919fe
feat: 로그인 실패 시 에러 메시지 표시
JayeHa 760a74e
refactor: profile 페이지에서 이벤트 바인딩 분리
JayeHa 2ea009a
chore: 테스트코드 성공을 위한 주석처리
JayeHa 3e0f487
feat: 라우트 가드 구현
JayeHa 05ff74d
refactor: 라우터 및 컴포넌트 초기화 방식 수정
sb-jungwon 64b772d
Merge branch 'basic' into advenced
sb-jungwon 82c5790
Merge branch 'basic' into advenced
sb-jungwon 366b609
Merge branch 'advenced' of https://github.com/JayeHa/front_3rd_chatpe…
JayeHa 6a8b67d
feat: 에러바운더리 우회적으로 구현
JayeHa da334cf
feat: 사용자 이름 검증
JayeHa 6a53143
Merge remote-tracking branch 'upstream/main' into advenced
JayeHa a2f6431
fix: resolve merge error
JayeHa 15b0fe7
config: 타입스크립트 설치
JayeHa d836c0a
refactor
JayeHa 4678955
fix: prettierignore 추가
JayeHa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/*.test.js | ||
|
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 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"arrowParens": "always" | ||
} | ||
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,13 +1,13 @@ | ||
<!doctype html> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>항해플러스 SNS</title> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>항해플러스 SNS</title> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"@testing-library/user-event": "^14.5.2", | ||
"@vitest/ui": "^2.1.1", | ||
"jsdom": "^25.0.0", | ||
"typescript": "^5.6.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오~ |
||
"vite": "^5.1.0", | ||
"vitest": "^2.1.1" | ||
} | ||
|
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,16 @@ | ||
import ErrorPage from './pages/error'; | ||
import HomePage from './pages/home'; | ||
import LoginPage from './pages/login'; | ||
import ProfilePage from './pages/profile'; | ||
import { router } from './shared/util/Router'; | ||
|
||
export default class App { | ||
constructor(selector: string) { | ||
router.init({ | ||
'/': () => new HomePage(selector), | ||
'/login': () => new LoginPage(selector), | ||
'/profile': () => new ProfilePage(selector), | ||
'/404': () => new ErrorPage(selector), | ||
}); | ||
} | ||
} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import App from './App'; | ||
|
||
new App('#root'); |
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,20 @@ | ||
import { BaseComponent } from '../shared/ui/BaseComponent'; | ||
|
||
export default class ErrorPage extends BaseComponent { | ||
template() { | ||
return ` | ||
<main class="bg-gray-100 flex items-center justify-center min-h-screen"> | ||
<div class="bg-white p-8 rounded-lg shadow-md w-full text-center" style="max-width: 480px"> | ||
<h1 class="text-2xl font-bold text-blue-600 mb-4">항해플러스</h1> | ||
<p class="text-4xl font-bold text-gray-800 mb-4">404</p> | ||
<p class="text-xl text-gray-600 mb-8">페이지를 찾을 수 없습니다</p> | ||
<p class="text-gray-600 mb-8"> | ||
요청하신 페이지가 존재하지 않거나 이동되었을 수 있습니다. | ||
</p> | ||
<a href="/" class="bg-blue-600 text-white px-4 py-2 rounded font-bold"> | ||
홈으로 돌아가기 | ||
</a> | ||
</div> | ||
</main>`; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
pritter는 제 vscode의 설정과 다른 부분이 있어서 기본값들도 명시적으로 설정했습니다 :)