-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract business logic (#30)
- Loading branch information
1 parent
2a40213
commit 9ce6076
Showing
81 changed files
with
3,523 additions
and
1,446 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default { | ||
testEnvironment: 'node', | ||
testMatch: ['**/*.test.(ts|tsx)'], | ||
transform: { | ||
'^.+.tsx?$': ['ts-jest', {}], | ||
}, | ||
}; |
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
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,44 @@ | ||
import * as Styled from './Callstack.styled.ts'; | ||
import InfoModal from 'components/Modal/Modal.tsx'; | ||
|
||
function CallStackModal({ | ||
isOpened, | ||
toggle, | ||
}: { | ||
isOpened: boolean; | ||
toggle: () => void; | ||
}) { | ||
return ( | ||
<InfoModal isOpened={isOpened} onClose={toggle}> | ||
<h2>Call stack</h2> | ||
<Styled.CloseIcon onClick={toggle} /> | ||
<p> | ||
A call stack is a mechanism for an interpreter to keep track of its | ||
place in a script that calls multiple functions — what function is | ||
currently being run and what functions are called from within that | ||
function, etc. | ||
</p> | ||
<ul> | ||
<li> | ||
When a script calls a function, the interpreter adds it to the call | ||
stack and then starts carrying out the function. | ||
</li> | ||
<li> | ||
Any functions that are called by that function are added to the call | ||
stack further up, and run where their calls are reached. | ||
</li> | ||
<li> | ||
When the current function is finished, the interpreter takes it off | ||
the stack and resumes execution where it left off in the last code | ||
listing. | ||
</li> | ||
<li> | ||
If the stack takes up more space than it was assigned, a "stack | ||
overflow" error is thrown. | ||
</li> | ||
</ul> | ||
</InfoModal> | ||
); | ||
} | ||
|
||
export default CallStackModal; |
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
Oops, something went wrong.