export default function CommentDialog(props) {
const {
approvalValue,
handleSubmit,
handleDialog,
handleChange,
handleApprovalChange,
value,
characterCount,
maxCharacterValue,
} = props;
const { handleOpen, handleClose, open } = handleDialog;
const classes = useStyles();
return (
<>
<AddCommentButton onClick={handleOpen} />
<Dialog fullWidth onClose={handleClose} aria-labelledby="customized-dialog-title" open={open}>
<DialogTitle id="customized-dialog-title" onClose={handleClose}>
Please select an outcome for this Targeting Request
</DialogTitle>
<RadioGroup
aria-label="quiz"
name="quiz"
value={approvalValue}
onChange={handleApprovalChange}
className={classes.radioButtons}
>
<FormControlLabel value="Approved" control={<Radio color="primary" />} label="APPROVE" />
<FormControlLabel value="Denied" control={<Radio color="secondary" />} label="DENY" />
</RadioGroup>
<DialogContent>
<MarkdownEditor
id="comment-markdown"
error={characterCount >= …Run Code Online (Sandbox Code Playgroud) 我希望创建一个不依赖客户端 JavaScript 的网站,但是,我仍然想使用客户端路由等 SPA 功能,因此我正在考虑使用不在客户端上呈现的框架 -边。这两个似乎是此类事情的首选,但是,我不确定这两种不同类型的服务器处理之间的差异。
我正在运行zip -r nm.zip node_modules并收到此错误:
zip warning: missing end signature--probably not a zip file (did you
zip warning: remember to use binary mode when you transferred it?)
zip warning: (if you are trying to read a damaged archive try -F)
Run Code Online (Sandbox Code Playgroud)
node_modules 是一个目录。我正在大厅内的 docker 容器内执行此操作。
我正在运行这个异步函数:
async function getIngress(namespace) {
try {
const result = await k8sIngressApi.listNamespacedIngress(namespace, true);
return result.body.items[0].spec.rules[0].http.paths[0].path;
} catch (e) {
console.error(e.response.body);
}
}
console.log(getIngress(argument);
Run Code Online (Sandbox Code Playgroud)
控制台日志只打印一个承诺。有没有一种方法可以像我尝试的那样在函数之外访问承诺的返回值?
node.js ×3
reactjs ×2
asynchronous ×1
concourse ×1
docker ×1
gatsby ×1
javascript ×1
jestjs ×1
material-ui ×1
next.js ×1
node-modules ×1
zip ×1