Added git hooks
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
GroupSetFactoryArrayBody,
|
||||
SetFactoryArrayBody
|
||||
} from '../../src/types/ApiSchemasFrontend'
|
||||
import {NextRouter, useRouter} from 'next/router'
|
||||
import { NextRouter, useRouter } from 'next/router'
|
||||
|
||||
interface Props {
|
||||
children: ReactNodeLike
|
||||
@@ -93,7 +93,7 @@ interface StoredFile {
|
||||
}
|
||||
|
||||
export const postFetchJson = async (router: NextRouter, url: string, body: unknown) => {
|
||||
const res = await fetch(router.basePath+url, {
|
||||
const res = await fetch(router.basePath + url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
@@ -129,7 +129,7 @@ export const GroupProvider: FC<Props> = ({ children, id, initial }) => {
|
||||
factories: val
|
||||
} as SetFactoryArrayBody).catch(console.error)
|
||||
},
|
||||
[id]
|
||||
[id, router]
|
||||
)
|
||||
|
||||
const setBasicValues = useCallback<typeof _setBasicValues>(
|
||||
@@ -140,7 +140,7 @@ export const GroupProvider: FC<Props> = ({ children, id, initial }) => {
|
||||
factories: val
|
||||
} as SetFactoryArrayBody).catch(console.error)
|
||||
},
|
||||
[id]
|
||||
[id, router]
|
||||
)
|
||||
|
||||
const addGroup = useCallback(
|
||||
@@ -180,7 +180,7 @@ export const GroupProvider: FC<Props> = ({ children, id, initial }) => {
|
||||
})().catch(console.error)
|
||||
return true
|
||||
},
|
||||
[groups, id]
|
||||
[groups, id, router]
|
||||
)
|
||||
const removeGroup = useCallback(
|
||||
(name: string) => {
|
||||
@@ -195,7 +195,7 @@ export const GroupProvider: FC<Props> = ({ children, id, initial }) => {
|
||||
{}
|
||||
).catch(console.error)
|
||||
},
|
||||
[id]
|
||||
[id, router]
|
||||
)
|
||||
const renameGroup = useCallback(
|
||||
(name: string, newName: string) => {
|
||||
@@ -215,7 +215,7 @@ export const GroupProvider: FC<Props> = ({ children, id, initial }) => {
|
||||
} as GroupRenameBody
|
||||
).catch(console.error)
|
||||
},
|
||||
[groups, id]
|
||||
[groups, id, router]
|
||||
)
|
||||
|
||||
const setFactories = useCallback(
|
||||
@@ -234,7 +234,7 @@ export const GroupProvider: FC<Props> = ({ children, id, initial }) => {
|
||||
} as GroupSetFactoryArrayBody
|
||||
).catch(console.error)
|
||||
},
|
||||
[id]
|
||||
[id, router]
|
||||
)
|
||||
const getInputType = useCallback(
|
||||
(uid: string) => {
|
||||
|
||||
Reference in New Issue
Block a user