mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Upgrade prettier before it will be removed forever
This commit is contained in:
@@ -22,11 +22,11 @@ export function getApp(
|
||||
state: { apps: Apps },
|
||||
clientId: string,
|
||||
): OauthAppResponse | null {
|
||||
return state.apps.available.find(app => app.clientId === clientId) || null;
|
||||
return state.apps.available.find((app) => app.clientId === clientId) || null;
|
||||
}
|
||||
|
||||
export function fetchApp(clientId: string): ThunkAction<Promise<void>> {
|
||||
return async dispatch => {
|
||||
return async (dispatch) => {
|
||||
const app = await oauth.getApp(clientId);
|
||||
|
||||
dispatch(addApp(app));
|
||||
@@ -88,7 +88,7 @@ export function resetApp(
|
||||
clientId: string,
|
||||
resetSecret: boolean,
|
||||
): ThunkAction<Promise<void>> {
|
||||
return async dispatch => {
|
||||
return async (dispatch) => {
|
||||
const { data: app } = await oauth.reset(clientId, resetSecret);
|
||||
|
||||
if (resetSecret) {
|
||||
|
@@ -19,7 +19,7 @@ const ApplicationTypeSwitcher: ComponentType<Props> = ({
|
||||
}) => (
|
||||
<div>
|
||||
{((Object.keys(appTypes) as unknown) as Array<ApplicationType>).map(
|
||||
type => (
|
||||
(type) => (
|
||||
<div className={styles.radioContainer} key={type}>
|
||||
<Radio
|
||||
onChange={() => setType(type)}
|
||||
|
@@ -151,7 +151,7 @@ export default class ApplicationItem extends React.Component<
|
||||
|
||||
<div
|
||||
className={styles.appActionContainer}
|
||||
ref={el => {
|
||||
ref={(el) => {
|
||||
this.actionContainer = el;
|
||||
}}
|
||||
>
|
||||
|
@@ -55,10 +55,10 @@ export default class ApplicationsList extends React.Component<Props, State> {
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.appsListContainer}>
|
||||
{applications.map(app => (
|
||||
{applications.map((app) => (
|
||||
<div
|
||||
key={app.clientId}
|
||||
ref={elem => {
|
||||
ref={(elem) => {
|
||||
this.appsRefs[app.clientId] = elem;
|
||||
}}
|
||||
>
|
||||
@@ -83,7 +83,7 @@ export default class ApplicationsList extends React.Component<Props, State> {
|
||||
if (
|
||||
clientId &&
|
||||
expandedApp !== clientId &&
|
||||
applications.some(app => app.clientId === clientId)
|
||||
applications.some((app) => app.clientId === clientId)
|
||||
) {
|
||||
requestAnimationFrame(() =>
|
||||
this.onTileClick(clientId, { noReset: true }),
|
||||
|
@@ -21,7 +21,9 @@ export default function apps(state: Apps = defaults, action: Action): Apps {
|
||||
case 'apps:addApp': {
|
||||
const { payload } = action;
|
||||
const available = [...state.available];
|
||||
let index = available.findIndex(app => app.clientId === payload.clientId);
|
||||
let index = available.findIndex(
|
||||
(app) => app.clientId === payload.clientId,
|
||||
);
|
||||
|
||||
if (index === -1) {
|
||||
index = available.length;
|
||||
@@ -39,7 +41,7 @@ export default function apps(state: Apps = defaults, action: Action): Apps {
|
||||
return {
|
||||
...state,
|
||||
available: state.available.filter(
|
||||
app => app.clientId !== action.payload,
|
||||
(app) => app.clientId !== action.payload,
|
||||
),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user