Commit c3b42099 authored by Stefan Probst's avatar Stefan Probst
Browse files

chore: lint import sort order

parent 75eee3be
import generate from '@stefanprobst/favicons'
import { log } from '@/utils/log'
import { image, title, shortTitle } from '@@/config/metadata.json'
import { image, shortTitle, title } from '@@/config/metadata.json'
generate({
inputFilePath: image.src,
......
import generate from '@stefanprobst/next-sitemap'
import { log } from '@/utils/log'
import { url as baseUrl } from '@@/config/metadata.json'
......
import { promises as fs, existsSync } from 'fs'
import { join } from 'path'
import { loadEnvConfig } from '@next/env'
import prettierConfig from '@stefanprobst/prettier-config'
import { existsSync, promises as fs } from 'fs'
import fetch from 'node-fetch'
import { generate } from 'openapi-ts-client'
import { join } from 'path'
import { log } from '@/utils/log'
/** load environment variables from `.env.local` */
......
import { posix } from 'path'
import { log } from '@/utils/log'
const gitlabBaseUrl = process.env.GITLAB_BASE_URL ?? 'https://gitlab.com'
......
......@@ -6,6 +6,7 @@
import type { UseMutationOptions, UseMutationResult } from 'react-query'
import { useMutation } from 'react-query'
import type { ImplicitGrantTokenData, OAuthRegistrationDto } from '@/api/sshoc'
import { request } from '@/api/sshoc'
......@@ -28,9 +29,9 @@ export namespace SignInUser {
export type RequestBody = LoginData
}
export function signInUser([body]: [body: SignInUser.RequestBody]): Promise<
SignInUser.Response.Success
> {
export function signInUser([body]: [
body: SignInUser.RequestBody,
]): Promise<SignInUser.Response.Success> {
return request({
path: '/api/auth/sign-in',
options: {
......
......@@ -6,6 +6,7 @@
*/
import type { ParsedUrlQuery } from 'querystring'
import type {
ItemCategory,
ItemSearchQuery,
......
import { Dialog } from '@reach/dialog'
import { useState } from 'react'
import { useQueryClient } from 'react-query'
import { useCreateActor, useGetActors, useGetAllActorRoles } from '@/api/sshoc'
import type { ActorCore } from '@/api/sshoc'
import { useCreateActor, useGetActors, useGetAllActorRoles } from '@/api/sshoc'
import { Button } from '@/elements/Button/Button'
import { Icon } from '@/elements/Icon/Icon'
import { Svg as CloseIcon } from '@/elements/icons/small/cross.svg'
......@@ -216,7 +216,7 @@ function CreateActorForm(props: CreateActorFormProps) {
}
return createActor.mutateAsync(
[values, { token: auth.session?.accessToken }],
[values, { token: auth.session.accessToken }],
{
onSuccess() {
queryClient.invalidateQueries(['getActors'])
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
DatasetCore,
DatasetDto,
useCreateDataset,
useGetLoggedInUser,
} from '@/api/sshoc'
import type { DatasetCore, DatasetDto } from '@/api/sshoc'
import { useCreateDataset, useGetLoggedInUser } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { DateFormSection } from '@/components/item/DateFormSection/DateFormSection'
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
DatasetCore,
DatasetDto,
useGetLoggedInUser,
useUpdateDataset,
} from '@/api/sshoc'
import type { DatasetCore, DatasetDto } from '@/api/sshoc'
import { useGetLoggedInUser, useUpdateDataset } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { DateFormSection } from '@/components/item/DateFormSection/DateFormSection'
......
......@@ -73,7 +73,7 @@ export function PropertiesFormSection(
<FormFieldCondition
name={`${name}.type.code`}
condition={(id) =>
id !== '' && propertyTypesById[id]?.type === 'concept'
id !== '' && propertyTypesById[id].type === 'concept'
}
>
{(id: string) => {
......@@ -92,7 +92,7 @@ export function PropertiesFormSection(
<FormFieldCondition
name={`${name}.type.code`}
condition={(id) =>
id !== '' && propertyTypesById[id]?.type !== 'concept'
id !== '' && propertyTypesById[id].type !== 'concept'
}
>
<FormTextField
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
PublicationCore,
PublicationDto,
useCreatePublication,
useGetLoggedInUser,
} from '@/api/sshoc'
import type { PublicationCore, PublicationDto } from '@/api/sshoc'
import { useCreatePublication, useGetLoggedInUser } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { DateFormSection } from '@/components/item/DateFormSection/DateFormSection'
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
PublicationCore,
PublicationDto,
useGetLoggedInUser,
useUpdatePublication,
} from '@/api/sshoc'
import type { PublicationCore, PublicationDto } from '@/api/sshoc'
import { useGetLoggedInUser, useUpdatePublication } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { DateFormSection } from '@/components/item/DateFormSection/DateFormSection'
......
import { useState } from 'react'
import { useGetSources } from '@/api/sshoc'
import { useDebouncedState } from '@/lib/hooks/useDebouncedState'
import { FormComboBox } from '@/modules/form/components/FormComboBox/FormComboBox'
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
ToolCore,
ToolDto,
useCreateTool,
useGetLoggedInUser,
} from '@/api/sshoc'
import type { ToolCore, ToolDto } from '@/api/sshoc'
import { useCreateTool, useGetLoggedInUser } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { MainFormSection } from '@/components/item/MainFormSection/MainFormSection'
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
ToolCore,
ToolDto,
useGetLoggedInUser,
useUpdateTool,
} from '@/api/sshoc'
import type { ToolCore, ToolDto } from '@/api/sshoc'
import { useGetLoggedInUser, useUpdateTool } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { MainFormSection } from '@/components/item/MainFormSection/MainFormSection'
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
TrainingMaterialCore,
TrainingMaterialDto,
useCreateTrainingMaterial,
useGetLoggedInUser,
} from '@/api/sshoc'
import type { TrainingMaterialCore, TrainingMaterialDto } from '@/api/sshoc'
import { useCreateTrainingMaterial, useGetLoggedInUser } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { MainFormSection } from '@/components/item/MainFormSection/MainFormSection'
......
import { useRouter } from 'next/router'
import { useQueryClient } from 'react-query'
import {
TrainingMaterialCore,
TrainingMaterialDto,
useGetLoggedInUser,
useUpdateTrainingMaterial,
} from '@/api/sshoc'
import type { TrainingMaterialCore, TrainingMaterialDto } from '@/api/sshoc'
import { useGetLoggedInUser, useUpdateTrainingMaterial } from '@/api/sshoc'
import type { ItemCategory, ItemSearchQuery } from '@/api/sshoc/types'
import { ActorsFormSection } from '@/components/item/ActorsFormSection/ActorsFormSection'
import { MainFormSection } from '@/components/item/MainFormSection/MainFormSection'
......
import decode from 'jwt-decode'
import type { PropsWithChildren } from 'react'
import { createContext, useContext, useMemo } from 'react'
import { useLocalStorage } from '@/utils/useLocalStorage'
type DecodedToken = {
......
import { useRouter } from 'next/router'
import { Fragment, useEffect } from 'react'
import type { PropsWithChildren } from 'react'
import { Fragment, useEffect } from 'react'
import { useAuth } from '@/modules/auth/AuthContext'
export default function ProtectedScreen({
......
import type { PropsWithChildren } from 'react'
import { Fragment } from 'react'
import { useAuth } from '@/modules/auth/AuthContext'
export default function ProtectedView({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment