diff --git a/pwa/app/auth.tsx b/pwa/app/auth.tsx index 714409d08..955c00640 100644 --- a/pwa/app/auth.tsx +++ b/pwa/app/auth.tsx @@ -1,8 +1,12 @@ -import { type TokenSet } from "@auth/core/types"; -import NextAuth, { type Session as DefaultSession, type User } from "next-auth"; +import {type TokenSet} from "@auth/core/types"; +import NextAuth, {type Session as DefaultSession, type User} from "next-auth"; import KeycloakProvider from "next-auth/providers/keycloak"; -import { NEXT_PUBLIC_OIDC_CLIENT_ID, NEXT_PUBLIC_OIDC_SERVER_URL, NEXT_PUBLIC_OIDC_SERVER_URL_INTERNAL } from "../config/keycloak"; +import { + NEXT_PUBLIC_OIDC_CLIENT_ID, + NEXT_PUBLIC_OIDC_SERVER_URL, + NEXT_PUBLIC_OIDC_SERVER_URL_INTERNAL +} from "../config/keycloak"; export interface Session extends DefaultSession { error?: "RefreshAccessTokenError" diff --git a/pwa/app/bookmarks/page.tsx b/pwa/app/bookmarks/page.tsx index 925790b5d..34c36acfd 100644 --- a/pwa/app/bookmarks/page.tsx +++ b/pwa/app/bookmarks/page.tsx @@ -1,11 +1,11 @@ -import { type Metadata } from "next"; -import { redirect } from "next/navigation"; - -import { List, type Props as ListProps } from "../../components/bookmark/List"; -import { type Bookmark } from "../../types/Bookmark"; -import { type PagedCollection } from "../../types/collection"; -import { type FetchResponse, fetchApi } from "../../utils/dataAccess"; -import { type Session, auth } from "../auth"; +import {type Metadata} from "next"; +import {redirect} from "next/navigation"; + +import {List, type Props as ListProps} from "../../components/bookmark/List"; +import {type Bookmark} from "../../types/Bookmark"; +import {type PagedCollection} from "../../types/collection"; +import {fetchApi, type FetchResponse} from "../../utils/dataAccess"; +import {auth, type Session} from "../auth"; interface Query extends URLSearchParams { page?: number|string|null; diff --git a/pwa/app/books/[id]/[slug]/page.tsx b/pwa/app/books/[id]/[slug]/page.tsx index b854363eb..c1d28cdc4 100644 --- a/pwa/app/books/[id]/[slug]/page.tsx +++ b/pwa/app/books/[id]/[slug]/page.tsx @@ -1,10 +1,10 @@ -import { type Metadata } from "next"; -import { notFound } from "next/navigation"; +import {type Metadata} from "next"; +import {notFound} from "next/navigation"; -import { Show, type Props as ShowProps } from "../../../../components/book/Show"; -import { Book } from "../../../../types/Book"; -import { type FetchResponse, fetchApi } from "../../../../utils/dataAccess"; -import { type Session, auth } from "../../../auth"; +import {type Props as ShowProps, Show} from "../../../../components/book/Show"; +import {Book} from "../../../../types/Book"; +import {fetchApi, type FetchResponse} from "../../../../utils/dataAccess"; +import {auth, type Session} from "../../../auth"; interface Props { params: { id: string }; diff --git a/pwa/app/books/page.tsx b/pwa/app/books/page.tsx index e8e8dc069..fe299c47c 100644 --- a/pwa/app/books/page.tsx +++ b/pwa/app/books/page.tsx @@ -1,11 +1,11 @@ -import { type Metadata } from "next"; +import {type Metadata} from "next"; import {auth, type Session} from "../auth"; -import { List, type Props as ListProps } from "../../components/book/List"; -import { type Book } from "../../types/Book"; -import { type PagedCollection } from "../../types/collection"; -import { type FetchResponse, fetchApi } from "../../utils/dataAccess"; -import { type FiltersProps, buildUriFromFilters } from "../../utils/book"; +import {List, type Props as ListProps} from "../../components/book/List"; +import {type Book} from "../../types/Book"; +import {type PagedCollection} from "../../types/collection"; +import {fetchApi, type FetchResponse} from "../../utils/dataAccess"; +import {buildUriFromFilters, type FiltersProps} from "../../utils/book"; interface Query extends URLSearchParams { page?: number|string|undefined; diff --git a/pwa/app/layout.tsx b/pwa/app/layout.tsx index 7d5c1debf..122c871f3 100644 --- a/pwa/app/layout.tsx +++ b/pwa/app/layout.tsx @@ -1,14 +1,14 @@ -import type { Metadata } from "next"; -import { type ReactNode } from "react"; -import { SessionProvider } from "next-auth/react"; +import type {Metadata} from "next"; +import {type ReactNode} from "react"; +import {SessionProvider} from "next-auth/react"; import "@fontsource/poppins"; import "@fontsource/poppins/600.css"; import "@fontsource/poppins/700.css"; -import { Layout } from "../components/common/Layout"; +import {Layout} from "../components/common/Layout"; import "../styles/globals.css"; -import { Providers } from "./providers"; -import { auth } from "./auth"; +import {Providers} from "./providers"; +import {auth} from "./auth"; export const metadata: Metadata = { title: 'Welcome to API Platform!', diff --git a/pwa/app/providers.tsx b/pwa/app/providers.tsx index d8341f69c..30701fd86 100644 --- a/pwa/app/providers.tsx +++ b/pwa/app/providers.tsx @@ -1,9 +1,9 @@ "use client"; -import { type ReactNode, useState } from "react"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; -import { ReactQueryStreamedHydration } from "@tanstack/react-query-next-experimental"; +import {type ReactNode, useState} from "react"; +import {QueryClient, QueryClientProvider} from "@tanstack/react-query"; +import {ReactQueryDevtools} from "@tanstack/react-query-devtools"; +import {ReactQueryStreamedHydration} from "@tanstack/react-query-next-experimental"; export function Providers(props: { children: ReactNode }) { const [queryClient] = useState( diff --git a/pwa/components/admin/Admin.tsx b/pwa/components/admin/Admin.tsx index adb0f6980..1f6d70f32 100644 --- a/pwa/components/admin/Admin.tsx +++ b/pwa/components/admin/Admin.tsx @@ -1,24 +1,18 @@ "use client"; import Head from "next/head"; -import { useContext, useRef, useState } from "react"; -import { type DataProvider, localStorageStore } from "react-admin"; -import { signIn, useSession } from "next-auth/react"; +import {useContext, useRef, useState} from "react"; +import {type DataProvider, localStorageStore} from "react-admin"; +import {signIn, useSession} from "next-auth/react"; import SyncLoader from "react-spinners/SyncLoader"; -import { - fetchHydra, - HydraAdmin, - hydraDataProvider, - OpenApiAdmin, - ResourceGuesser, -} from "@api-platform/admin"; -import { parseHydraDocumentation } from "@api-platform/api-doc-parser"; - -import { type Session } from "../../app/auth"; +import {fetchHydra, HydraAdmin, hydraDataProvider, OpenApiAdmin, ResourceGuesser,} from "@api-platform/admin"; +import {parseHydraDocumentation} from "@api-platform/api-doc-parser"; + +import {type Session} from "../../app/auth"; import DocContext from "../../components/admin/DocContext"; import authProvider from "../../components/admin/authProvider"; import Layout from "./layout/Layout"; -import { ENTRYPOINT } from "../../config/entrypoint"; +import {ENTRYPOINT} from "../../config/entrypoint"; import bookResourceProps from "./book"; import reviewResourceProps from "./review"; import i18nProvider from "./i18nProvider"; diff --git a/pwa/components/admin/DocContext.ts b/pwa/components/admin/DocContext.ts index a9d6bcf31..6432496f8 100644 --- a/pwa/components/admin/DocContext.ts +++ b/pwa/components/admin/DocContext.ts @@ -1,4 +1,4 @@ -import { createContext } from "react"; +import {createContext} from "react"; const DocContext = createContext({ docType: "hydra", diff --git a/pwa/components/admin/authProvider.tsx b/pwa/components/admin/authProvider.tsx index e11727724..20eeaf189 100644 --- a/pwa/components/admin/authProvider.tsx +++ b/pwa/components/admin/authProvider.tsx @@ -1,7 +1,7 @@ -import { AuthProvider } from "react-admin"; -import { getSession, signIn, signOut } from "next-auth/react"; +import {AuthProvider} from "react-admin"; +import {getSession, signIn, signOut} from "next-auth/react"; -import { NEXT_PUBLIC_OIDC_SERVER_URL } from "../../config/keycloak"; +import {NEXT_PUBLIC_OIDC_SERVER_URL} from "../../config/keycloak"; const authProvider: AuthProvider = { // Nothing to do here, this function will never be called diff --git a/pwa/components/admin/book/BookForm.tsx b/pwa/components/admin/book/BookForm.tsx index 53283a5df..1ced82de2 100644 --- a/pwa/components/admin/book/BookForm.tsx +++ b/pwa/components/admin/book/BookForm.tsx @@ -1,7 +1,7 @@ -import { required } from "react-admin"; +import {required} from "react-admin"; -import { ConditionInput } from "./ConditionInput"; -import { BookInput } from "./BookInput"; +import {ConditionInput} from "./ConditionInput"; +import {BookInput} from "./BookInput"; export const BookForm = () => ( <> diff --git a/pwa/components/admin/book/BookInput.tsx b/pwa/components/admin/book/BookInput.tsx index 57589f9ee..20422cea3 100644 --- a/pwa/components/admin/book/BookInput.tsx +++ b/pwa/components/admin/book/BookInput.tsx @@ -1,14 +1,14 @@ -import { SyntheticEvent, useMemo, useRef, useState } from "react"; +import {SyntheticEvent, useMemo, useRef, useState} from "react"; import Autocomplete from "@mui/material/Autocomplete"; -import { debounce } from "@mui/material"; -import { TextInput, type TextInputProps, useInput } from "react-admin"; -import { useQuery } from "@tanstack/react-query"; -import { useWatch } from "react-hook-form"; +import {debounce} from "@mui/material"; +import {TextInput, type TextInputProps, useInput} from "react-admin"; +import {useQuery} from "@tanstack/react-query"; +import {useWatch} from "react-hook-form"; -import { Search as OpenLibrarySearch } from "../../../types/OpenLibrary/Search"; -import { SearchDoc as OpenLibrarySearchDoc } from "../../../types/OpenLibrary/SearchDoc"; -import { Search as GutendexSearch } from "../../../types/Gutendex/Search"; -import { SearchDoc as GutendexSearchDoc } from "../../../types/Gutendex/SearchDoc"; +import {Search as OpenLibrarySearch} from "../../../types/OpenLibrary/Search"; +import {SearchDoc as OpenLibrarySearchDoc} from "../../../types/OpenLibrary/SearchDoc"; +import {Search as GutendexSearch} from "../../../types/Gutendex/Search"; +import {SearchDoc as GutendexSearchDoc} from "../../../types/Gutendex/SearchDoc"; interface Result { title: string; diff --git a/pwa/components/admin/book/BooksCreate.tsx b/pwa/components/admin/book/BooksCreate.tsx index f40bc657a..e6e4d71de 100644 --- a/pwa/components/admin/book/BooksCreate.tsx +++ b/pwa/components/admin/book/BooksCreate.tsx @@ -1,6 +1,6 @@ -import { CreateGuesser, type CreateGuesserProps } from "@api-platform/admin"; +import {CreateGuesser, type CreateGuesserProps} from "@api-platform/admin"; -import { BookForm } from "./BookForm"; +import {BookForm} from "./BookForm"; export const BooksCreate = (props: CreateGuesserProps) => ( diff --git a/pwa/components/admin/book/BooksEdit.tsx b/pwa/components/admin/book/BooksEdit.tsx index 21d1d47e9..98ce26021 100644 --- a/pwa/components/admin/book/BooksEdit.tsx +++ b/pwa/components/admin/book/BooksEdit.tsx @@ -1,8 +1,8 @@ -import { EditGuesser, type EditGuesserProps } from "@api-platform/admin"; -import { TopToolbar } from "react-admin"; +import {EditGuesser} from "@api-platform/admin"; +import {TopToolbar} from "react-admin"; -import { BookForm } from "./BookForm"; -import { ShowButton } from "./ShowButton"; +import {BookForm} from "./BookForm"; +import {ShowButton} from "./ShowButton"; // @ts-ignore const Actions = () => ( diff --git a/pwa/components/admin/book/BooksList.tsx b/pwa/components/admin/book/BooksList.tsx index 32a7b7ee6..e168ec20d 100644 --- a/pwa/components/admin/book/BooksList.tsx +++ b/pwa/components/admin/book/BooksList.tsx @@ -1,16 +1,9 @@ -import { FieldGuesser } from "@api-platform/admin"; -import { - TextInput, - Datagrid, - useRecordContext, - List, - EditButton, - WrapperField, -} from "react-admin"; +import {FieldGuesser} from "@api-platform/admin"; +import {Datagrid, EditButton, List, TextInput, useRecordContext, WrapperField,} from "react-admin"; -import { ShowButton } from "./ShowButton"; -import { RatingField } from "../review/RatingField"; -import { ConditionInput } from "./ConditionInput"; +import {ShowButton} from "./ShowButton"; +import {RatingField} from "../review/RatingField"; +import {ConditionInput} from "./ConditionInput"; const ConditionField = () => { const record = useRecordContext(); diff --git a/pwa/components/admin/book/ConditionInput.tsx b/pwa/components/admin/book/ConditionInput.tsx index 1f70c0213..2cc52a1a5 100644 --- a/pwa/components/admin/book/ConditionInput.tsx +++ b/pwa/components/admin/book/ConditionInput.tsx @@ -1,4 +1,4 @@ -import { SelectInput, SelectInputProps } from "react-admin"; +import {SelectInput, SelectInputProps} from "react-admin"; export const ConditionInput = (props: SelectInputProps) => ( { const record = useRecordContext(); diff --git a/pwa/components/admin/book/index.ts b/pwa/components/admin/book/index.ts index c89753fd6..e00de3a0f 100644 --- a/pwa/components/admin/book/index.ts +++ b/pwa/components/admin/book/index.ts @@ -1,7 +1,7 @@ -import { BooksList } from "./BooksList"; -import { BooksCreate } from "./BooksCreate"; -import { BooksEdit } from "./BooksEdit"; -import { type Book } from "../../../types/Book"; +import {BooksList} from "./BooksList"; +import {BooksCreate} from "./BooksCreate"; +import {BooksEdit} from "./BooksEdit"; +import {type Book} from "../../../types/Book"; const bookResourceProps = { list: BooksList, diff --git a/pwa/components/admin/i18nProvider.ts b/pwa/components/admin/i18nProvider.ts index d607ce587..ab2734091 100644 --- a/pwa/components/admin/i18nProvider.ts +++ b/pwa/components/admin/i18nProvider.ts @@ -1,4 +1,4 @@ -import { resolveBrowserLocale } from "react-admin"; +import {resolveBrowserLocale} from "react-admin"; import polyglotI18nProvider from "ra-i18n-polyglot"; import englishMessages from "ra-language-english"; import frenchMessages from "ra-language-french"; diff --git a/pwa/components/admin/layout/AppBar.tsx b/pwa/components/admin/layout/AppBar.tsx index 4d5d0f1ce..c8ac1d473 100644 --- a/pwa/components/admin/layout/AppBar.tsx +++ b/pwa/components/admin/layout/AppBar.tsx @@ -1,4 +1,4 @@ -import { AppBar, UserMenu, TitlePortal } from "react-admin"; +import {AppBar, TitlePortal, UserMenu} from "react-admin"; import Logo from "../Logo"; import Logout from "./Logout"; diff --git a/pwa/components/admin/layout/DocTypeMenuButton.tsx b/pwa/components/admin/layout/DocTypeMenuButton.tsx index 990903eed..d03638abd 100644 --- a/pwa/components/admin/layout/DocTypeMenuButton.tsx +++ b/pwa/components/admin/layout/DocTypeMenuButton.tsx @@ -1,6 +1,6 @@ -import { useContext, useState } from "react"; -import { useStore } from "react-admin"; -import { Button, Menu, MenuItem } from "@mui/material"; +import {useContext, useState} from "react"; +import {useStore} from "react-admin"; +import {Button, Menu, MenuItem} from "@mui/material"; import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; import DocContext from "../DocContext"; diff --git a/pwa/components/admin/layout/Layout.tsx b/pwa/components/admin/layout/Layout.tsx index bd8dc5bf4..300e745f8 100644 --- a/pwa/components/admin/layout/Layout.tsx +++ b/pwa/components/admin/layout/Layout.tsx @@ -1,4 +1,4 @@ -import { Layout, type LayoutProps } from "react-admin"; +import {Layout, type LayoutProps} from "react-admin"; import AppBar from "./AppBar"; import Menu from "./Menu"; diff --git a/pwa/components/admin/layout/Logout.tsx b/pwa/components/admin/layout/Logout.tsx index 35ae1ace1..247bc0600 100644 --- a/pwa/components/admin/layout/Logout.tsx +++ b/pwa/components/admin/layout/Logout.tsx @@ -1,11 +1,11 @@ -import { ForwardedRef, forwardRef } from "react"; -import { LogoutClasses, useTranslate } from "react-admin"; +import {ForwardedRef, forwardRef} from "react"; +import {LogoutClasses, useTranslate} from "react-admin"; -import { ListItemIcon, ListItemText, MenuItem } from "@mui/material"; +import {ListItemIcon, ListItemText, MenuItem} from "@mui/material"; import ExitIcon from "@mui/icons-material/PowerSettingsNew"; -import { signOut, useSession } from "next-auth/react"; +import {signOut, useSession} from "next-auth/react"; -import { NEXT_PUBLIC_OIDC_SERVER_URL } from "../../../config/keycloak"; +import {NEXT_PUBLIC_OIDC_SERVER_URL} from "../../../config/keycloak"; const Logout = forwardRef((props, ref: ForwardedRef) => { const { data: session } = useSession(); diff --git a/pwa/components/admin/layout/Menu.tsx b/pwa/components/admin/layout/Menu.tsx index de805abe3..3d3de27e8 100644 --- a/pwa/components/admin/layout/Menu.tsx +++ b/pwa/components/admin/layout/Menu.tsx @@ -1,4 +1,4 @@ -import { Menu } from "react-admin"; +import {Menu} from "react-admin"; import MenuBookIcon from "@mui/icons-material/MenuBook"; import CommentIcon from "@mui/icons-material/Comment"; diff --git a/pwa/components/admin/review/BookField.tsx b/pwa/components/admin/review/BookField.tsx index 08bfd8d89..53974fd3a 100644 --- a/pwa/components/admin/review/BookField.tsx +++ b/pwa/components/admin/review/BookField.tsx @@ -1,8 +1,8 @@ -import { useRecordContext, type UseRecordContextParams } from "react-admin"; +import {useRecordContext, type UseRecordContextParams} from "react-admin"; import Link from "next/link"; import slugify from "slugify"; -import { getItemPath } from "../../../utils/dataAccess"; +import {getItemPath} from "../../../utils/dataAccess"; export const BookField = (props: UseRecordContextParams) => { const record = useRecordContext(props); diff --git a/pwa/components/admin/review/RatingField.tsx b/pwa/components/admin/review/RatingField.tsx index bea8321e1..3e4e62730 100644 --- a/pwa/components/admin/review/RatingField.tsx +++ b/pwa/components/admin/review/RatingField.tsx @@ -1,4 +1,4 @@ -import { useRecordContext } from "react-admin"; +import {useRecordContext} from "react-admin"; import Rating from "@mui/material/Rating"; export const RatingField = () => { diff --git a/pwa/components/admin/review/RatingInput.tsx b/pwa/components/admin/review/RatingInput.tsx index f6972eb79..ef460d31a 100644 --- a/pwa/components/admin/review/RatingInput.tsx +++ b/pwa/components/admin/review/RatingInput.tsx @@ -1,9 +1,6 @@ -import { Labeled, useInput } from "react-admin"; -import { - type CommonInputProps, - type ResettableTextFieldProps, -} from "ra-ui-materialui"; -import Rating, { type RatingProps } from "@mui/material/Rating"; +import {Labeled, useInput} from "react-admin"; +import {type CommonInputProps, type ResettableTextFieldProps,} from "ra-ui-materialui"; +import Rating, {type RatingProps} from "@mui/material/Rating"; export type RatingInputProps = RatingProps & CommonInputProps & diff --git a/pwa/components/admin/review/ReviewsEdit.tsx b/pwa/components/admin/review/ReviewsEdit.tsx index a9af62e6a..a8037eb2d 100644 --- a/pwa/components/admin/review/ReviewsEdit.tsx +++ b/pwa/components/admin/review/ReviewsEdit.tsx @@ -1,14 +1,9 @@ -import { EditGuesser } from "@api-platform/admin"; -import { - AutocompleteInput, - ReferenceInput, - required, - TextInput, -} from "react-admin"; +import {EditGuesser} from "@api-platform/admin"; +import {AutocompleteInput, ReferenceInput, required, TextInput,} from "react-admin"; -import { type Book } from "../../../types/Book"; -import { type Review } from "../../../types/Review"; -import { RatingInput } from "./RatingInput"; +import {type Book} from "../../../types/Book"; +import {type Review} from "../../../types/Review"; +import {RatingInput} from "./RatingInput"; const transform = (data: Review) => ({ ...data, diff --git a/pwa/components/admin/review/ReviewsList.tsx b/pwa/components/admin/review/ReviewsList.tsx index ab2ef48ec..0c8ab447a 100644 --- a/pwa/components/admin/review/ReviewsList.tsx +++ b/pwa/components/admin/review/ReviewsList.tsx @@ -1,21 +1,21 @@ import { - TextField, - DateField, + AutocompleteInput, Datagrid, + DateField, + EditButton, List, ListActions, - EditButton, - ShowButton, ReferenceInput, - AutocompleteInput, + ShowButton, + TextField, WrapperField, } from "react-admin"; -import { BookField } from "./BookField"; -import { RatingField } from "./RatingField"; -import { RatingInput } from "./RatingInput"; -import { type Book } from "../../../types/Book"; -import { User } from "../../../types/User"; +import {BookField} from "./BookField"; +import {RatingField} from "./RatingField"; +import {RatingInput} from "./RatingInput"; +import {type Book} from "../../../types/Book"; +import {User} from "../../../types/User"; const bookQuery = (searchText: string) => { const values = searchText diff --git a/pwa/components/admin/review/ReviewsShow.tsx b/pwa/components/admin/review/ReviewsShow.tsx index 7517fb912..12a64023d 100644 --- a/pwa/components/admin/review/ReviewsShow.tsx +++ b/pwa/components/admin/review/ReviewsShow.tsx @@ -1,8 +1,8 @@ -import { FieldGuesser, ShowGuesser } from "@api-platform/admin"; -import { TextField, Labeled } from "react-admin"; +import {FieldGuesser, ShowGuesser} from "@api-platform/admin"; +import {Labeled, TextField} from "react-admin"; -import { RatingField } from "./RatingField"; -import { BookField } from "./BookField"; +import {RatingField} from "./RatingField"; +import {BookField} from "./BookField"; export const ReviewsShow = () => ( diff --git a/pwa/components/admin/review/index.ts b/pwa/components/admin/review/index.ts index 3f20da340..f049132fa 100644 --- a/pwa/components/admin/review/index.ts +++ b/pwa/components/admin/review/index.ts @@ -1,7 +1,7 @@ -import { ReviewsList } from "./ReviewsList"; -import { ReviewsEdit } from "./ReviewsEdit"; -import { ReviewsShow } from "./ReviewsShow"; -import { type Review } from "../../../types/Review"; +import {ReviewsList} from "./ReviewsList"; +import {ReviewsEdit} from "./ReviewsEdit"; +import {ReviewsShow} from "./ReviewsShow"; +import {type Review} from "../../../types/Review"; const reviewResourceProps = { list: ReviewsList, diff --git a/pwa/components/book/Filters.tsx b/pwa/components/book/Filters.tsx index fac38dde3..6ac8cd059 100644 --- a/pwa/components/book/Filters.tsx +++ b/pwa/components/book/Filters.tsx @@ -1,12 +1,12 @@ -import { Formik } from "formik"; -import { type FunctionComponent } from "react"; -import { type UseMutationResult } from "@tanstack/react-query"; -import { Checkbox, debounce, FormControlLabel, FormGroup, TextField, Typography } from "@mui/material"; +import {Formik} from "formik"; +import {type FunctionComponent} from "react"; +import {type UseMutationResult} from "@tanstack/react-query"; +import {Checkbox, debounce, FormControlLabel, FormGroup, TextField, Typography} from "@mui/material"; -import { type FiltersProps } from "../../utils/book"; -import { type FetchError, type FetchResponse } from "../../utils/dataAccess"; -import { type PagedCollection } from "../../types/collection"; -import { type Book } from "../../types/Book"; +import {type FiltersProps} from "../../utils/book"; +import {type FetchError, type FetchResponse} from "../../utils/dataAccess"; +import {type PagedCollection} from "../../types/collection"; +import {type Book} from "../../types/Book"; interface Props { filters: FiltersProps | undefined; diff --git a/pwa/components/book/Item.tsx b/pwa/components/book/Item.tsx index 4fa3a3370..0999f632c 100644 --- a/pwa/components/book/Item.tsx +++ b/pwa/components/book/Item.tsx @@ -1,12 +1,12 @@ import Image from "next/image"; import Link from "next/link"; -import { type FunctionComponent } from "react"; +import {type FunctionComponent} from "react"; import Rating from "@mui/material/Rating"; -import { type Book } from "../../types/Book"; -import { getItemPath } from "../../utils/dataAccess"; -import { useOpenLibraryBook } from "../../utils/book"; -import { Loading } from "../common/Loading"; +import {type Book} from "../../types/Book"; +import {getItemPath} from "../../utils/dataAccess"; +import {useOpenLibraryBook} from "../../utils/book"; +import {Loading} from "../common/Loading"; interface Props { book: Book; diff --git a/pwa/components/book/List.tsx b/pwa/components/book/List.tsx index 9c5fb97b9..4ae1ae705 100644 --- a/pwa/components/book/List.tsx +++ b/pwa/components/book/List.tsx @@ -1,18 +1,18 @@ "use client"; -import { type NextPage } from "next"; -import { useRouter } from "next/navigation"; -import { useMutation } from "@tanstack/react-query"; +import {type NextPage} from "next"; +import {useRouter} from "next/navigation"; +import {useMutation} from "@tanstack/react-query"; import FilterListOutlinedIcon from "@mui/icons-material/FilterListOutlined"; -import { MenuItem, Select } from "@mui/material"; +import {MenuItem, Select} from "@mui/material"; -import { Item } from "./Item"; -import { Filters } from "./Filters"; -import { Pagination } from "../common/Pagination"; -import { type Book } from "../../types/Book"; -import { type PagedCollection } from "../../types/collection"; -import { type FiltersProps, buildUriFromFilters } from "../../utils/book"; -import { useMercure } from "../../utils/mercure"; +import {Item} from "./Item"; +import {Filters} from "./Filters"; +import {Pagination} from "../common/Pagination"; +import {type Book} from "../../types/Book"; +import {type PagedCollection} from "../../types/collection"; +import {buildUriFromFilters, type FiltersProps} from "../../utils/book"; +import {useMercure} from "../../utils/mercure"; export interface Props { data: PagedCollection | null; diff --git a/pwa/components/book/Show.tsx b/pwa/components/book/Show.tsx index ca09f2917..d683d9956 100644 --- a/pwa/components/book/Show.tsx +++ b/pwa/components/book/Show.tsx @@ -1,25 +1,25 @@ "use client"; -import { type NextPage } from "next"; +import {type NextPage} from "next"; import Image from "next/image"; import Link from "next/link"; -import { signIn, useSession } from "next-auth/react"; -import { useEffect, useState } from "react"; -import { useMutation } from "@tanstack/react-query"; +import {signIn, useSession} from "next-auth/react"; +import {useEffect, useState} from "react"; +import {useMutation} from "@tanstack/react-query"; import Typography from "@mui/material/Typography"; import Breadcrumbs from "@mui/material/Breadcrumbs"; import Rating from '@mui/material/Rating'; import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorder"; import FavoriteIcon from "@mui/icons-material/Favorite"; -import { type Book } from "../../types/Book"; -import { useMercure } from "../../utils/mercure"; -import { List as Reviews } from "../../components/review/List"; -import { useOpenLibraryBook } from "../../utils/book"; -import { fetchApi, type FetchResponse } from "../../utils/dataAccess"; -import { type Bookmark } from "../../types/Bookmark"; -import { type PagedCollection } from "../../types/collection"; -import { Loading } from "../common/Loading"; +import {type Book} from "../../types/Book"; +import {useMercure} from "../../utils/mercure"; +import {List as Reviews} from "../../components/review/List"; +import {useOpenLibraryBook} from "../../utils/book"; +import {fetchApi, type FetchResponse} from "../../utils/dataAccess"; +import {type Bookmark} from "../../types/Bookmark"; +import {type PagedCollection} from "../../types/collection"; +import {Loading} from "../common/Loading"; export interface Props { data: Book; diff --git a/pwa/components/bookmark/List.tsx b/pwa/components/bookmark/List.tsx index c383c5ec4..883999e7a 100644 --- a/pwa/components/bookmark/List.tsx +++ b/pwa/components/bookmark/List.tsx @@ -1,12 +1,12 @@ "use client"; -import { type NextPage } from "next"; +import {type NextPage} from "next"; -import { Item } from "../../components/book/Item"; -import { Pagination } from "../../components/common/Pagination"; -import { type Bookmark } from "../../types/Bookmark"; -import { type PagedCollection } from "../../types/collection"; -import { useMercure } from "../../utils/mercure"; +import {Item} from "../../components/book/Item"; +import {Pagination} from "../../components/common/Pagination"; +import {type Bookmark} from "../../types/Bookmark"; +import {type PagedCollection} from "../../types/collection"; +import {useMercure} from "../../utils/mercure"; export interface Props { data: PagedCollection | null; diff --git a/pwa/components/common/Header.tsx b/pwa/components/common/Header.tsx index c7b3c8188..0755a5264 100644 --- a/pwa/components/common/Header.tsx +++ b/pwa/components/common/Header.tsx @@ -1,12 +1,12 @@ "use client"; -import { signIn, signOut, useSession } from "next-auth/react"; -import { usePathname } from "next/navigation"; +import {signIn, signOut, useSession} from "next-auth/react"; +import {usePathname} from "next/navigation"; import Link from "next/link"; import PersonOutlineIcon from "@mui/icons-material/PersonOutline"; import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorder"; -import { NEXT_PUBLIC_OIDC_SERVER_URL } from "../../config/keycloak"; +import {NEXT_PUBLIC_OIDC_SERVER_URL} from "../../config/keycloak"; export const Header = () => { const pathname = usePathname(); diff --git a/pwa/components/common/Layout.tsx b/pwa/components/common/Layout.tsx index 6c23b250f..2e8eb3a63 100644 --- a/pwa/components/common/Layout.tsx +++ b/pwa/components/common/Layout.tsx @@ -1,6 +1,6 @@ -import { type ReactNode } from "react"; +import {type ReactNode} from "react"; -import { Header } from "./Header"; +import {Header} from "./Header"; export const Layout = ({ children }: { children: ReactNode }) => { return ( diff --git a/pwa/components/common/Pagination.tsx b/pwa/components/common/Pagination.tsx index a106f8856..3adf8f5b2 100644 --- a/pwa/components/common/Pagination.tsx +++ b/pwa/components/common/Pagination.tsx @@ -1,9 +1,9 @@ import MuiPagination from "@mui/material/Pagination"; -import { PaginationItem } from "@mui/material"; +import {PaginationItem} from "@mui/material"; import Link from "next/link"; -import { type PagedCollection } from "../../types/collection"; -import { parsePage } from "../../utils/dataAccess"; +import {type PagedCollection} from "../../types/collection"; +import {parsePage} from "../../utils/dataAccess"; interface Props { collection: PagedCollection; diff --git a/pwa/components/review/Form.tsx b/pwa/components/review/Form.tsx index 4b0a65dee..043288bf0 100644 --- a/pwa/components/review/Form.tsx +++ b/pwa/components/review/Form.tsx @@ -1,13 +1,13 @@ -import { type FunctionComponent } from "react"; -import { Formik } from "formik"; +import {type FunctionComponent} from "react"; +import {Formik} from "formik"; import * as Yup from "yup"; -import { useMutation } from "@tanstack/react-query"; -import { FormGroup, TextareaAutosize } from "@mui/material"; +import {useMutation} from "@tanstack/react-query"; +import {FormGroup, TextareaAutosize} from "@mui/material"; import Rating from "@mui/material/Rating"; -import { fetchApi, type FetchError, type FetchResponse } from "../../utils/dataAccess"; -import { type Book } from "../../types/Book"; -import { type Review } from "../../types/Review"; +import {fetchApi} from "../../utils/dataAccess"; +import {type Book} from "../../types/Book"; +import {type Review} from "../../types/Review"; import {useSession} from "next-auth/react"; interface Props { diff --git a/pwa/components/review/Item.tsx b/pwa/components/review/Item.tsx index cfb116616..10f022e6d 100644 --- a/pwa/components/review/Item.tsx +++ b/pwa/components/review/Item.tsx @@ -1,14 +1,13 @@ -import { type FunctionComponent, useState } from "react"; -import { useMutation } from "@tanstack/react-query"; -import { useSession } from "next-auth/react"; +import {type FunctionComponent, useState} from "react"; +import {useMutation} from "@tanstack/react-query"; +import {useSession} from "next-auth/react"; import Rating from "@mui/material/Rating"; -import { Error } from "../common/Error"; -import { type Review } from "../../types/Review"; -import { fetchApi } from "../../utils/dataAccess"; -import { Form } from "./Form"; +import {Error} from "../common/Error"; +import {type Review} from "../../types/Review"; +import {fetchApi} from "../../utils/dataAccess"; +import {Form} from "./Form"; import {usePermission} from "../../utils/review"; -import {useOpenLibraryBook} from "../../utils/book"; interface Props { review: Review; diff --git a/pwa/components/review/List.tsx b/pwa/components/review/List.tsx index 8fbc138d5..d230d8b9b 100644 --- a/pwa/components/review/List.tsx +++ b/pwa/components/review/List.tsx @@ -1,19 +1,19 @@ "use client"; -import { type FunctionComponent, useEffect, useState } from "react"; -import { signIn, useSession } from "next-auth/react"; -import { useSearchParams } from "next/navigation"; +import {type FunctionComponent, useEffect, useState} from "react"; +import {signIn, useSession} from "next-auth/react"; +import {useSearchParams} from "next/navigation"; -import { Pagination } from "../common/Pagination"; -import { type Book } from "../../types/Book"; -import { type PagedCollection } from "../../types/collection"; -import { type Review } from "../../types/Review"; -import { fetchApi, type FetchResponse, getItemPath } from "../../utils/dataAccess"; -import { useMercure } from "../../utils/mercure"; -import { Error } from "../common/Error"; -import { Item } from "./Item"; -import { Form } from "./Form"; -import { Loading } from "../common/Loading"; +import {Pagination} from "../common/Pagination"; +import {type Book} from "../../types/Book"; +import {type PagedCollection} from "../../types/collection"; +import {type Review} from "../../types/Review"; +import {fetchApi, type FetchResponse, getItemPath} from "../../utils/dataAccess"; +import {useMercure} from "../../utils/mercure"; +import {Error} from "../common/Error"; +import {Item} from "./Item"; +import {Form} from "./Form"; +import {Loading} from "../common/Loading"; interface Props { book: Book;