-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: dev환경 webpack 설정 구현 * chore: common환경 webpack 설정 구현 * chore: prod환경 webpack 설정 구현 * chore: 기존 웹팩 환경 파일 제거 * chore: 불필요한 babelrc 파일 제거 * chore: 빌드 명령어 변경 및 사용하지 않는 라이브러리 제거 * chore: 타입체킹에 실패하면 빌드가 되지 않도록 설정 * fix: 페이지 code 스플리팅으로 인한 suspense 오류 해결 * fix: axios 401 에러로 인한 주석 처리 * fix: 간헐적 에러 발생 오류 해결 #674 * refactor: 변경된 모달 컴포넌트 적용 * fix: 모달 content 내용 넘어가는 버그 해결 * fix: modal 버전 업그레이드 및 필요없는 파일 제거
- Loading branch information
Showing
20 changed files
with
786 additions
and
691 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 |
---|---|---|
@@ -1,7 +1,29 @@ | ||
import { Suspense } from 'react'; | ||
import { styled } from 'styled-components'; | ||
import LoadingIndicator from '~/components/@common/LoadingIndicator'; | ||
|
||
import Router from './router/Router'; | ||
|
||
function App() { | ||
return <Router />; | ||
return ( | ||
<Suspense | ||
fallback={ | ||
<StyledProcessing> | ||
<LoadingIndicator size={64} /> | ||
</StyledProcessing> | ||
} | ||
> | ||
<Router /> | ||
</Suspense> | ||
); | ||
} | ||
|
||
export default App; | ||
|
||
const StyledProcessing = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
`; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
92 changes: 46 additions & 46 deletions
92
frontend/src/components/@common/ErrorBoundary/ErrorBoundary.tsx
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,46 +1,46 @@ | ||
import { Component, ReactElement, ReactNode } from 'react'; | ||
|
||
interface FallbackRenderProps { | ||
resetErrorBoundary: () => void; | ||
} | ||
interface Props { | ||
children: ReactNode; | ||
fallbackRender: ({ resetErrorBoundary }: FallbackRenderProps) => ReactElement; | ||
reset: () => void; | ||
} | ||
|
||
interface State { | ||
hasError: boolean; | ||
} | ||
|
||
class ErrorBoundary extends Component<Props, State> { | ||
constructor(props: Props) { | ||
super(props); | ||
this.state = { hasError: false }; | ||
} | ||
|
||
static getDerivedStateFromError(): State { | ||
return { | ||
hasError: true, | ||
}; | ||
} | ||
|
||
resetErrorBoundary() { | ||
const { reset } = this.props; | ||
reset(); | ||
this.setState({ hasError: false }); | ||
} | ||
|
||
render() { | ||
const { hasError } = this.state; | ||
const { children, fallbackRender } = this.props; | ||
|
||
if (hasError) { | ||
return fallbackRender({ resetErrorBoundary: () => this.resetErrorBoundary() }); | ||
} | ||
|
||
return children; | ||
} | ||
} | ||
|
||
export default ErrorBoundary; | ||
// import { Component, ReactElement, ReactNode } from 'react'; | ||
|
||
// interface FallbackRenderProps { | ||
// resetErrorBoundary: () => void; | ||
// } | ||
// interface Props { | ||
// children: ReactNode; | ||
// fallbackRender: ({ resetErrorBoundary }: FallbackRenderProps) => ReactElement; | ||
// reset: () => void; | ||
// } | ||
|
||
// interface State { | ||
// hasError: boolean; | ||
// } | ||
|
||
// class ErrorBoundary extends Component<Props, State> { | ||
// constructor(props: Props) { | ||
// super(props); | ||
// this.state = { hasError: false }; | ||
// } | ||
|
||
// static getDerivedStateFromError(): State { | ||
// return { | ||
// hasError: true, | ||
// }; | ||
// } | ||
|
||
// resetErrorBoundary() { | ||
// const { reset } = this.props; | ||
// reset(); | ||
// this.setState({ hasError: false }); | ||
// } | ||
|
||
// render() { | ||
// const { hasError } = this.state; | ||
// const { children, fallbackRender } = this.props; | ||
|
||
// if (hasError) { | ||
// return fallbackRender({ resetErrorBoundary: () => this.resetErrorBoundary() }); | ||
// } | ||
|
||
// return children; | ||
// } | ||
// } | ||
|
||
// export default ErrorBoundary; |
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 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
Oops, something went wrong.