mirror of
https://github.com/logto-io/logto.git
synced 2025-02-24 22:05:56 -05:00
refactor: remove import react (#1558)
This commit is contained in:
parent
c90d2ceb32
commit
e7c5e63304
307 changed files with 508 additions and 839 deletions
|
@ -27,7 +27,7 @@
|
|||
"@logto/connector-types": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"dayjs": "^1.10.5",
|
||||
"got": "^11.8.2",
|
||||
"iconv-lite": "0.6.3",
|
||||
|
@ -37,8 +37,8 @@
|
|||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@shopify/jest-koa-mocks": "^5.0.0",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/lodash.pick": "^4.4.6",
|
||||
"@types/node": "^16.3.1",
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"@logto/connector-types": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"dayjs": "^1.10.5",
|
||||
"got": "^11.8.2",
|
||||
"iconv-lite": "0.6.3",
|
||||
|
@ -37,8 +37,8 @@
|
|||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@shopify/jest-koa-mocks": "^5.0.0",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/lodash.pick": "^4.4.6",
|
||||
"@types/node": "^16.3.1",
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
"@logto/connector-types": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
"@logto/schemas": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -29,15 +29,15 @@
|
|||
"@logto/schemas": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"jose": "^4.3.8",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
"@logto/schemas": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -29,15 +29,15 @@
|
|||
"@logto/schemas": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"query-string": "^7.0.1",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
"@logto/schemas": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
"@logto/connector-types": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.6",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
"@logto/connector-types": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.6",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"nodemailer": "^6.7.5",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"@types/nodemailer": "^6.4.4",
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
"@logto/connector-types": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.6",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@shopify/jest-koa-mocks": "^5.0.0",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/essentials": "^1.1.6",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"eslint": "^8.19.0",
|
||||
"jest": "^27.5.1",
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
"@logto/schemas": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
"@logto/schemas": "^1.0.0-beta.0",
|
||||
"@logto/shared": "^1.0.0-beta.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/jest-config": "^0.16.2",
|
||||
"@silverhand/jest-config": "^0.17.0",
|
||||
"got": "^11.8.2",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^27.5.1",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.19.0",
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
"@parcel/transformer-mdx": "2.6.2",
|
||||
"@parcel/transformer-sass": "2.6.2",
|
||||
"@parcel/transformer-svg-react": "2.6.2",
|
||||
"@silverhand/eslint-config": "^0.16.2",
|
||||
"@silverhand/eslint-config-react": "^0.16.3",
|
||||
"@silverhand/eslint-config": "^0.17.0",
|
||||
"@silverhand/eslint-config-react": "^0.17.0",
|
||||
"@silverhand/essentials": "^1.1.6",
|
||||
"@silverhand/ts-config": "^0.16.2",
|
||||
"@silverhand/ts-config-react": "^0.16.3",
|
||||
"@silverhand/ts-config": "^0.17.0",
|
||||
"@silverhand/ts-config-react": "^0.17.0",
|
||||
"@tsconfig/docusaurus": "^1.0.5",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/lodash.kebabcase": "^4.1.6",
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { LogtoProvider } from '@logto/react';
|
||||
import { adminConsoleApplicationId, managementResource } from '@logto/schemas/lib/seeds';
|
||||
import { getBasename } from '@logto/shared';
|
||||
import React from 'react';
|
||||
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
|
||||
import { SWRConfig } from 'swr';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { forwardRef } from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import Button, { Props as ButtonProps } from '../Button';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { ReactNode, useRef, useState } from 'react';
|
||||
import { ReactNode, useRef, useState } from 'react';
|
||||
|
||||
import { Props as ButtonProps } from '../Button';
|
||||
import Dropdown from '../Dropdown';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import LinkButton from '@/components/LinkButton';
|
||||
import Info from '@/icons/Info';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { AppearanceMode } from '@logto/schemas';
|
||||
import React, { ReactNode, useEffect } from 'react';
|
||||
import { ReactNode, useEffect } from 'react';
|
||||
|
||||
import useUserPreferences from '@/hooks/use-user-preferences';
|
||||
import initI18n from '@/i18n/init';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ReactModal from 'react-modal';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ReactChild, ReactNode, useMemo, useState } from 'react';
|
||||
import { ReactChild, ReactNode, useMemo, useState } from 'react';
|
||||
import { TFuncKey, useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { conditionalString, Optional } from '@silverhand/essentials';
|
||||
import React, { FC, ReactNode } from 'react';
|
||||
import { FC, ReactNode } from 'react';
|
||||
import { TFuncKey, useTranslation } from 'react-i18next';
|
||||
|
||||
import useUserPreferences from '@/hooks/use-user-preferences';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const BarGraph = (props: SVGProps<SVGSVGElement>) => (
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Bolt = (props: SVGProps<SVGSVGElement>) => (
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Box = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Cloud = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Connection = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Contact = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Document = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Gear = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const List = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const UserProfile = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { SVGProps } from 'react';
|
||||
import { SVGProps } from 'react';
|
||||
|
||||
const Web = (props: SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import Spacer from '@/components/Spacer';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useLogto, IdTokenClaims } from '@logto/react';
|
||||
import classNames from 'classnames';
|
||||
import React, { useEffect, useRef, useState, MouseEvent } from 'react';
|
||||
import { useEffect, useRef, useState, MouseEvent } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import Dropdown, { DropdownItem } from '@/components/Dropdown';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
const UserInfoSkeleton = () => (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { LogtoClientError, LogtoError, useLogto } from '@logto/react';
|
||||
import { conditional } from '@silverhand/essentials';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Outlet, useHref, useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { AppearanceMode } from '@logto/schemas';
|
||||
import React, { useState } from 'react';
|
||||
import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import ErrorDark from '@/assets/images/error-dark.svg';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
import IllustrationDark from '@/assets/images/loading-illustration-dark.svg';
|
||||
import Illustration from '@/assets/images/loading-illustration.svg';
|
||||
import { Daisy as Spinner } from '@/components/Spinner';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { AppearanceMode, ApplicationType } from '@logto/schemas';
|
||||
import React from 'react';
|
||||
|
||||
import { darkModeApplicationIconMap, lightModeApplicationIconMap } from '@/consts';
|
||||
import { useTheme } from '@/hooks/use-theme';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { Application } from '@logto/schemas';
|
||||
import { adminConsoleApplicationId } from '@logto/schemas/lib/seeds';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import useSWR from 'swr';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { Application } from '@logto/schemas';
|
||||
import { adminConsoleApplicationId } from '@logto/schemas/lib/seeds';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import useSWR from 'swr';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { logEventTitle } from '@/consts/logs';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import Select from '@/components/Select';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { LogDto, LogResult } from '@logto/schemas';
|
||||
import { conditionalString } from '@silverhand/essentials';
|
||||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import useSWR from 'swr';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { HTMLProps, ReactElement, ReactNode, useEffect, useRef, useState } from 'react';
|
||||
import { HTMLProps, ReactElement, ReactNode, useEffect, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Ring as Spinner } from '@/components/Spinner';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { forwardRef, Ref, ReactNode } from 'react';
|
||||
import { forwardRef, Ref, ReactNode } from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactElement } from 'react';
|
||||
import { ReactElement } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import DangerousRaw from '../DangerousRaw';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { AppearanceMode } from '@logto/schemas';
|
||||
import React from 'react';
|
||||
|
||||
import { useTheme } from '@/hooks/use-theme';
|
||||
import CheckBoxSelected from '@/icons/CheckBoxSelected';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { nanoid } from 'nanoid';
|
||||
import React, { ReactNode, useState } from 'react';
|
||||
import { ReactNode, useState } from 'react';
|
||||
|
||||
import Icon from './Icon';
|
||||
import * as styles from './index.module.scss';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ChangeEvent } from 'react';
|
||||
import { ChangeEvent } from 'react';
|
||||
import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter';
|
||||
import { a11yDark as theme } from 'react-syntax-highlighter/dist/esm/styles/prism';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { nanoid } from 'nanoid';
|
||||
import React, { ChangeEventHandler, useState } from 'react';
|
||||
import { ChangeEventHandler, useState } from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import ReactModal from 'react-modal';
|
||||
|
||||
import Button, { ButtonType } from '@/components/Button';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { MouseEventHandler, useEffect, useRef, useState } from 'react';
|
||||
import { MouseEventHandler, useEffect, useRef, useState } from 'react';
|
||||
import { TFuncKey, useTranslation } from 'react-i18next';
|
||||
|
||||
import Copy from '@/icons/Copy';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { Nullable } from '@silverhand/essentials';
|
||||
import dayjs from 'dayjs';
|
||||
import React from 'react';
|
||||
|
||||
type Props = {
|
||||
children: Nullable<string | number>;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { ReactNode, useState } from 'react';
|
||||
import { ReactNode, useState } from 'react';
|
||||
|
||||
import ConfirmModal from '@/components/ConfirmModal';
|
||||
import TextInput from '@/components/TextInput';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
import Spacer from '@/components/Spacer';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import React from 'react';
|
||||
import ReactModal from 'react-modal';
|
||||
|
||||
import Close from '@/icons/Close';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { MouseEvent } from 'react';
|
||||
import { MouseEvent } from 'react';
|
||||
|
||||
import * as styles from './DropdownItem.module.scss';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ReactNode, RefObject, useRef } from 'react';
|
||||
import { ReactNode, RefObject, useRef } from 'react';
|
||||
import ReactModal from 'react-modal';
|
||||
|
||||
import usePosition, { HorizontalAlignment } from '@/hooks/use-position';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { conditional } from '@silverhand/essentials';
|
||||
import React, { Component, ReactNode } from 'react';
|
||||
import { Component, ReactNode } from 'react';
|
||||
|
||||
import AppError from '../AppError';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactElement, ReactNode, useRef } from 'react';
|
||||
import { ReactElement, ReactNode, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import Tip from '@/icons/Tip';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { HTMLProps } from 'react';
|
||||
import { HTMLProps } from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
|
||||
import Tick from '@/icons/Tick';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { Link, To } from 'react-router-dom';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactElement, ReactNode } from 'react';
|
||||
import { ReactElement, ReactNode } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { HTMLProps, useRef, useState } from 'react';
|
||||
import { HTMLProps, useRef, useState } from 'react';
|
||||
|
||||
const githubRawUrlPrefix = 'https://raw.githubusercontent.com/logto-io/logto/master';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { conditionalString, Optional } from '@silverhand/essentials';
|
||||
import classNames from 'classnames';
|
||||
import React, { memo } from 'react';
|
||||
import { memo, useRef } from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
|
||||
|
@ -14,7 +14,7 @@ type Props = {
|
|||
};
|
||||
|
||||
const Markdown = ({ className, children }: Props) => {
|
||||
const tocIdSet = React.useRef<Set<string>>(new Set());
|
||||
const tocIdSet = useRef<Set<string>>(new Set());
|
||||
|
||||
const generateTocId = (text: string): Optional<string> => {
|
||||
const resolveIdCollision = (kebabCaseString: string, index = 0): string => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import Close from '@/icons/Close';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { KeyboardEvent, useMemo, useState } from 'react';
|
||||
import { KeyboardEvent, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import * as textButtonStyles from '@/components/TextButton/index.module.scss';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
const Next = () => {
|
||||
return (
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
const Previous = () => {
|
||||
return (
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import ReactPaginate from 'react-paginate';
|
||||
|
||||
import Button from '../Button';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AdminConsoleKey } from '@logto/phrases';
|
||||
import classNames from 'classnames';
|
||||
import React, { KeyboardEventHandler, ReactNode, useCallback } from 'react';
|
||||
import { KeyboardEventHandler, ReactNode, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, {
|
||||
Children,
|
||||
cloneElement,
|
||||
forwardRef,
|
||||
isValidElement,
|
||||
LegacyRef,
|
||||
ReactNode,
|
||||
} from 'react';
|
||||
import { Children, cloneElement, forwardRef, isValidElement, LegacyRef, ReactNode } from 'react';
|
||||
|
||||
import Radio, { Props as RadioProps } from './Radio';
|
||||
import * as styles from './index.module.scss';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FormEventHandler, KeyboardEventHandler, useState } from 'react';
|
||||
import { FormEventHandler, KeyboardEventHandler, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import SearchIcon from '@/icons/Search';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ReactEventHandler, ReactNode, useRef, useState } from 'react';
|
||||
import { ReactEventHandler, ReactNode, useRef, useState } from 'react';
|
||||
|
||||
import { KeyboardArrowDown, KeyboardArrowUp } from '@/icons/Arrow';
|
||||
import Close from '@/icons/Close';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { useLogto } from '@logto/react';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHref } from 'react-router-dom';
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
const Spacer = () => {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { forwardRef, HTMLProps, ReactNode, Ref } from 'react';
|
||||
import { forwardRef, HTMLProps, ReactNode, Ref } from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
|
||||
import * as styles from './TabNavItem.module.scss';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { AppearanceMode } from '@logto/schemas';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import EmptyDark from '@/assets/images/table-empty-dark.svg';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { AppearanceMode } from '@logto/schemas';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import ErrorDark from '@/assets/images/error-dark.svg';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
import * as styles from './TableLoading.module.scss';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { forwardRef, HTMLProps, ReactNode, ForwardedRef } from 'react';
|
||||
import { forwardRef, HTMLProps, ReactNode, ForwardedRef } from 'react';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { Toaster, resolveValue } from 'react-hot-toast';
|
||||
|
||||
import Error from '@/assets/images/toast-error.svg';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ReactNode, RefObject, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
||||
import { ReactNode, RefObject, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
import usePosition, { HorizontalAlignment } from '@/hooks/use-position';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { conditionalString } from '@silverhand/essentials';
|
||||
import React, { createContext, ReactNode, useMemo, useState } from 'react';
|
||||
import { createContext, ReactNode, useMemo, useState } from 'react';
|
||||
import { DndProvider } from 'react-dnd';
|
||||
import { HTML5Backend } from 'react-dnd-html5-backend';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Nullable } from '@silverhand/essentials';
|
||||
import type { Identifier, XYCoord } from 'dnd-core';
|
||||
import React, { ReactNode, useContext, useEffect, useRef } from 'react';
|
||||
import { ReactNode, useContext, useEffect, useRef } from 'react';
|
||||
import { useDrag, useDrop } from 'react-dnd';
|
||||
|
||||
import { DragDropContext } from './DragDropProvider';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import React, { ReactNode, useMemo } from 'react';
|
||||
import { ReactNode, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import CircleMinus from '@/icons/CircleMinus';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { Blocker, Transition } from 'history';
|
||||
import React, { useCallback, useContext, useLayoutEffect, useState } from 'react';
|
||||
import { useCallback, useContext, useLayoutEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { UNSAFE_NavigationContext, Navigator } from 'react-router-dom';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { User, UserRole } from '@logto/schemas';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import useSWR from 'swr';
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue