package.json: add precommit script
code-style: add files to prettierignore
This commit is contained in:
parent
c476f42e45
commit
38c2356aca
@ -1 +1,3 @@
|
||||
.next
|
||||
.next
|
||||
public
|
||||
services/crm/graphql/schema.graphql
|
||||
@ -9,6 +9,7 @@
|
||||
"lint": "next lint",
|
||||
"lint:fix": "next lint -- --fix",
|
||||
"prettier": "prettier --write .",
|
||||
"precommit": "yarn prettier && yarn lint:fix",
|
||||
"graphql:codegen": "apollo client:codegen --target typescript",
|
||||
"graphql:schema": "apollo client:download-schema services/crm/graphql/schema.graphql"
|
||||
},
|
||||
|
||||
@ -8,8 +8,8 @@ export default class MyDocument extends Document {
|
||||
|
||||
try {
|
||||
ctx.renderPage = () => originalRenderPage({
|
||||
enhanceApp: (App) => (props) => sheet.collectStyles(<App {...props} />),
|
||||
});
|
||||
enhanceApp: (App) => (props) => sheet.collectStyles(<App {...props} />),
|
||||
});
|
||||
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
return {
|
||||
|
||||
@ -13,8 +13,8 @@ export const getServerSideProps: GetServerSideProps<PageProps> = async (ctx) =>
|
||||
const user = await fetchUser({
|
||||
headers: ctx?.req?.headers?.cookie
|
||||
? {
|
||||
cookie: ctx.req.headers.cookie,
|
||||
}
|
||||
cookie: ctx.req.headers.cookie,
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user