+
);
diff --git a/src/components/external-link/ExternalLink.tsx b/src/components/external-link/ExternalLink.tsx
index 00444da2b2..8491667307 100644
--- a/src/components/external-link/ExternalLink.tsx
+++ b/src/components/external-link/ExternalLink.tsx
@@ -1,5 +1,5 @@
-import React from 'react';
-import { ExternalLinkAltIcon } from '@patternfly/react-icons';
+import React from "react";
+import { ExternalLinkAltIcon } from "@patternfly/react-icons";
export const ExternalLink = ({
title,
@@ -8,8 +8,8 @@ export const ExternalLink = ({
}: React.HTMLProps
) => {
return (
- {title ? title : href}{' '}
- {href?.startsWith('http') && }
+ {title ? title : href}{" "}
+ {href?.startsWith("http") && }
);
};
diff --git a/src/components/realm-selector/RealmSelector.tsx b/src/components/realm-selector/RealmSelector.tsx
index 6ce565bcc4..eed8b12cfa 100644
--- a/src/components/realm-selector/RealmSelector.tsx
+++ b/src/components/realm-selector/RealmSelector.tsx
@@ -1,13 +1,13 @@
-import React, { useState } from 'react';
-import { useHistory } from 'react-router-dom';
+import React, { useState } from "react";
+import { useHistory } from "react-router-dom";
import {
Dropdown,
DropdownToggle,
DropdownItem,
Button,
-} from '@patternfly/react-core';
+} from "@patternfly/react-core";
-import style from './realm-selector.module.css';
+import style from "./realm-selector.module.css";
type RealmSelectorProps = {
realm: string;
@@ -39,7 +39,7 @@ export const RealmSelector = ({ realm, realmList }: RealmSelectorProps) => {
dropdownItems={[
...dropdownItems,
-
+
,
]}
/>
diff --git a/src/components/scroll-form/FormPanel.tsx b/src/components/scroll-form/FormPanel.tsx
index 9482be2993..8e6a9f7aad 100644
--- a/src/components/scroll-form/FormPanel.tsx
+++ b/src/components/scroll-form/FormPanel.tsx
@@ -1,7 +1,7 @@
-import React from 'react';
-import { Title } from '@patternfly/react-core';
+import React from "react";
+import { Title } from "@patternfly/react-core";
-import style from './form-panel.module.css';
+import style from "./form-panel.module.css";
interface FormPanelProps extends React.HTMLProps {
title: string;
diff --git a/src/components/scroll-form/ScrollForm.tsx b/src/components/scroll-form/ScrollForm.tsx
index 692e5ac0be..d6a0e81189 100644
--- a/src/components/scroll-form/ScrollForm.tsx
+++ b/src/components/scroll-form/ScrollForm.tsx
@@ -1,8 +1,8 @@
-import React, { Children, useEffect, useState } from 'react';
-import { Form, Grid, GridItem, Title } from '@patternfly/react-core';
+import React, { Children, useEffect, useState } from "react";
+import { Form, Grid, GridItem, Title } from "@patternfly/react-core";
-import { FormPanel } from './FormPanel';
-import style from './scroll-form.module.css';
+import { FormPanel } from "./FormPanel";
+import style from "./scroll-form.module.css";
type ScrollFormProps = {
sections: string[];
@@ -26,7 +26,7 @@ export const ScrollForm = ({ sections, children }: ScrollFormProps) => {
const [active, setActive] = useState(sections[0]);
useEffect(() => {
- window.addEventListener('scroll', () => {
+ window.addEventListener("scroll", () => {
const active = getCurrentSection();
if (active) {
setActive(active);
@@ -44,7 +44,7 @@ export const ScrollForm = ({ sections, children }: ScrollFormProps) => {
{sections.map((cat) => (
@@ -54,7 +54,7 @@ export const ScrollForm = ({ sections, children }: ScrollFormProps) => {
onClick={() =>
document
.getElementById(cat)
- ?.scrollIntoView({ behavior: 'smooth' })
+ ?.scrollIntoView({ behavior: "smooth" })
}
>
{cat}
diff --git a/src/components/table-toolbar/TableToolbar.tsx b/src/components/table-toolbar/TableToolbar.tsx
index 8d92cc4e82..f1e3657b4c 100644
--- a/src/components/table-toolbar/TableToolbar.tsx
+++ b/src/components/table-toolbar/TableToolbar.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React from "react";
import {
ToggleTemplateProps,
Toolbar,
@@ -8,8 +8,8 @@ import {
TextInput,
Button,
Pagination,
-} from '@patternfly/react-core';
-import { SearchIcon } from '@patternfly/react-icons';
+} from "@patternfly/react-core";
+import { SearchIcon } from "@patternfly/react-icons";
type TableToolbarProps = {
count: number;
@@ -33,7 +33,7 @@ export const TableToolbar = ({
children,
}: TableToolbarProps) => {
const page = first / max;
- const pagination = (variant: 'top' | 'bottom' = 'top') => (
+ const pagination = (variant: "top" | "bottom" = "top") => (
(
@@ -63,15 +63,13 @@ export const TableToolbar = ({
- { toolbarItem &&
- { toolbarItem }
- }
+ {toolbarItem && {toolbarItem}}
{pagination()}
{children}
- {pagination('bottom')}
+ {pagination("bottom")}
>
);
diff --git a/src/forms/realm/NewRealmForm.tsx b/src/forms/realm/NewRealmForm.tsx
index 5a4aeff39f..732dd25e65 100644
--- a/src/forms/realm/NewRealmForm.tsx
+++ b/src/forms/realm/NewRealmForm.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React from "react";
import {
Text,
PageSection,
diff --git a/src/http-service/HttpClientContext.tsx b/src/http-service/HttpClientContext.tsx
index 6706f8ab6b..79389e6fc8 100644
--- a/src/http-service/HttpClientContext.tsx
+++ b/src/http-service/HttpClientContext.tsx
@@ -1,5 +1,5 @@
-import { createContext } from 'react';
-import { HttpClient } from './http-client';
+import { createContext } from "react";
+import { HttpClient } from "./http-client";
export const HttpClientContext = createContext(
undefined
diff --git a/src/http-service/http-client.ts b/src/http-service/http-client.ts
index 934b955399..88c7e3de4f 100644
--- a/src/http-service/http-client.ts
+++ b/src/http-service/http-client.ts
@@ -1,4 +1,4 @@
-import { KeycloakService } from '../auth/keycloak.service';
+import { KeycloakService } from "../auth/keycloak.service";
type ConfigResolve = (config: RequestInit) => void;
@@ -31,14 +31,14 @@ export class HttpClient {
endpoint: string,
config?: RequestInitWithParams
): Promise> {
- return this.doRequest(endpoint, { ...config, method: 'get' });
+ return this.doRequest(endpoint, { ...config, method: "get" });
}
public async doDelete(
endpoint: string,
config?: RequestInitWithParams
): Promise> {
- return this.doRequest(endpoint, { ...config, method: 'delete' });
+ return this.doRequest(endpoint, { ...config, method: "delete" });
}
public async doPost(
@@ -49,7 +49,7 @@ export class HttpClient {
return this.doRequest(endpoint, {
...config,
body: JSON.stringify(body),
- method: 'post',
+ method: "post",
});
}
@@ -61,7 +61,7 @@ export class HttpClient {
return this.doRequest(endpoint, {
...config,
body: JSON.stringify(body),
- method: 'put',
+ method: "put",
});
}
@@ -103,14 +103,14 @@ export class HttpClient {
private makeUrl(url: string, config?: RequestInitWithParams): string {
const searchParams = new URLSearchParams();
// add request params
- if (config && {}.hasOwnProperty.call(config, 'params')) {
+ if (config && {}.hasOwnProperty.call(config, "params")) {
const params: { [name: string]: string } = (config.params as {}) || {};
Object.keys(params).forEach((key) =>
searchParams.append(key, params[key])
);
}
- return url + '?' + searchParams.toString();
+ return url + "?" + searchParams.toString();
}
private makeConfig(config: RequestInit = {}): Promise {
@@ -121,9 +121,9 @@ export class HttpClient {
resolve({
...config,
headers: {
- 'Content-Type': 'application/json',
+ "Content-Type": "application/json",
...config.headers,
- Authorization: 'Bearer ' + token,
+ Authorization: "Bearer " + token,
},
});
})
@@ -135,7 +135,7 @@ export class HttpClient {
}
window.addEventListener(
- 'unhandledrejection',
+ "unhandledrejection",
(event: PromiseRejectionEvent) => {
event.promise.catch((error) => {
if (error instanceof AccountServiceError) {
diff --git a/src/i18n.ts b/src/i18n.ts
index 367679431f..bb29a1cb7d 100644
--- a/src/i18n.ts
+++ b/src/i18n.ts
@@ -1,13 +1,13 @@
-import i18n from 'i18next';
-import { initReactI18next } from 'react-i18next';
+import i18n from "i18next";
+import { initReactI18next } from "react-i18next";
// import backend from "i18next-http-backend";
-import messages from './messages.json';
+import messages from "./messages.json";
const initOptions = {
resources: messages,
- lng: 'en',
- fallbackLng: 'en',
+ lng: "en",
+ fallbackLng: "en",
saveMissing: true,
interpolation: {
diff --git a/src/index.tsx b/src/index.tsx
index 5740f822a3..91c7ddf673 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,14 +1,14 @@
-import React from 'react';
-import ReactDom from 'react-dom';
-import { I18nextProvider } from 'react-i18next';
-import { i18n } from './i18n';
+import React from "react";
+import ReactDom from "react-dom";
+import { I18nextProvider } from "react-i18next";
+import { i18n } from "./i18n";
-import { App } from './App';
-import init from './auth/keycloak';
-import { KeycloakContext } from './auth/KeycloakContext';
-import { KeycloakService } from './auth/keycloak.service';
-import { HttpClientContext } from './http-service/HttpClientContext';
-import { HttpClient } from './http-service/http-client';
+import { App } from "./App";
+import init from "./auth/keycloak";
+import { KeycloakContext } from "./auth/KeycloakContext";
+import { KeycloakService } from "./auth/keycloak.service";
+import { HttpClientContext } from "./http-service/HttpClientContext";
+import { HttpClient } from "./http-service/http-client";
init().then((keycloak) => {
const keycloakService = new KeycloakService(keycloak);
@@ -20,10 +20,10 @@ init().then((keycloak) => {
,
- document.getElementById('app')
+ document.getElementById("app")
);
});
-(document.getElementById('favicon') as HTMLAnchorElement).href = `${
+(document.getElementById("favicon") as HTMLAnchorElement).href = `${
import.meta.env.SNOWPACK_PUBLIC_FAVICON
}`;
diff --git a/src/util.ts b/src/util.ts
index 3a7eb65386..fcfdf6e7bd 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -1,14 +1,17 @@
import { ProviderRepresentation } from "./model/server-info";
-export const sortProvider = (a: [string, ProviderRepresentation], b: [string, ProviderRepresentation]) => {
+export const sortProvider = (
+ a: [string, ProviderRepresentation],
+ b: [string, ProviderRepresentation]
+) => {
let s1, s2;
if (a[1].order != b[1].order) {
s1 = b[1].order;
s2 = a[1].order;
-} else {
+ } else {
s1 = a[0];
s2 = b[0];
-}
+ }
if (s1 < s2) {
return -1;
} else if (s1 > s2) {