我使用用户名密码来推送我的代码,它已经工作了几个月,但突然间我无法做到并收到此错误:
Username for 'https://github.com': shreyas-jadhav
Password for 'https://shreyas-jadhav@github.com':
remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
Run Code Online (Sandbox Code Playgroud)
请注意,该链接没有帮助。即使使用生成的令牌也无济于事。
主持人注意:这是GitHub 计划中且即将进行的永久性服务更改的一部分
如何不使用布局组件包装特定页面_app.js?
例如,我有两个页面 aspages/home和pages/about,现在我怎么能不用组件包装我的pages/home页面Layout呢?
页面/_app.js
import "../styles/globals.css";
import Layout from "../components/Layout";
function MyApp({ Component, pageProps }) {
return (
<Layout>
<Component {...pageProps} />
</Layout>
);
}
export default MyApp;
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
页面/_app.js
function MyApp({ Component, pageProps }) {
console.log(typeof Component); // gives me a function
switch (Component) {
case Home():
return <Component {...pageProps} />;
default:
return (
<Layout>
<Component {...pageProps} />{" "}
</Layout>
);
}
}
Run Code Online (Sandbox Code Playgroud)
页面/home.js
import …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用默认检查值渲染 mui Switch 组件。但它不起作用,我收到警告。
MUI: A component is changing the default checked state of an uncontrolled SwitchBase after being initialized. To suppress this warning opt to use a controlled SwitchBase. 3 useControlled.js:27
Run Code Online (Sandbox Code Playgroud)
我也尝试过设置checked属性,onChange但仍然不起作用!我不明白我在这里做错了什么。
{details.schedule.days.map((d) => (
<StyledTableRow>
<TableCell>
<Typography variant="subtitle1" fontWeight="bold">
{d.day}
</Typography>
</TableCell>
<TableCell>
<FormControlLabel
control={
<Switch
onChange={(e, checked) => {
setDetails((p) => {
let prev = { ...p };
prev.schedule?.days?.find(
(el) =>
el.day === d.day &&
(d.open = e.target.checked)
);
return prev;
});
}} …Run Code Online (Sandbox Code Playgroud) reactjs ×2
git ×1
git-pull ×1
github ×1
github-api ×1
javascript ×1
material-ui ×1
next.js ×1
token ×1