-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: change to English comment fix: remove sessionStorage fix: wrapper safeParse mod: add param query mod: remove code
- Loading branch information
1 parent
e19daae
commit 5f59f9a
Showing
6 changed files
with
156 additions
and
29 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
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,32 @@ | ||
import { Alert } from 'antd'; | ||
import React from 'react'; | ||
|
||
import './index.less'; | ||
|
||
interface IProps { | ||
cmd: string; | ||
result?: string; | ||
onHistoryItem: (value: string) => void; | ||
} | ||
|
||
class LocalCmdOutputBox extends React.Component<IProps> { | ||
render() { | ||
const { cmd, result } = this.props; | ||
return ( | ||
<div className="cmd-box"> | ||
<Alert | ||
message={ | ||
<p className="gql" onClick={() => this.props.onHistoryItem(cmd)}> | ||
$ {cmd} | ||
</p> | ||
} | ||
className="cmd-value" | ||
type={result?.includes('success') ? 'success' : 'error'} | ||
/> | ||
<div className="cmd-result">{result}</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default LocalCmdOutputBox; |
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