Skip to content

Commit

Permalink
fix: do not do type-only imports of React
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Mar 5, 2024
1 parent e6665a3 commit 643f73c
Show file tree
Hide file tree
Showing 42 changed files with 163 additions and 173 deletions.
1 change: 0 additions & 1 deletion resources/assets/src/components/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type React from 'react';

type AlertType = 'success' | 'info' | 'warning' | 'danger';

Expand Down
1 change: 0 additions & 1 deletion resources/assets/src/components/ButtonEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type React from 'react';

type Properties = {
readonly title?: string;
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/components/DarkModeButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState} from 'react';
import {useState} from 'react';
import * as fetch from '@/scripts/net';

type Properties = {
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/components/EmailSuggestion.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @jsxImportSource @emotion/react */
import type React from 'react';

import {useState, useEffect} from 'react';
import Autosuggest from 'react-autosuggest';
import {css} from '@emotion/react';
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect, useRef} from 'react';
import {useState, useEffect, useRef} from 'react';
import $ from 'jquery';
import 'bootstrap';
import {t} from '../scripts/i18n';
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/components/ModalBody.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import ModalContent, {type Props as ContentProperties} from './ModalContent';
import ModalInput, {
type
Expand Down
1 change: 0 additions & 1 deletion resources/assets/src/components/ModalContent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type React from 'react';

export type Props = {
readonly text?: string;
Expand Down
1 change: 0 additions & 1 deletion resources/assets/src/components/ModalFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type React from 'react';

export type Props = {
readonly flexFooter?: boolean;
Expand Down
1 change: 0 additions & 1 deletion resources/assets/src/components/ModalHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type React from 'react';

export type Props = {
readonly title?: string;
Expand Down
1 change: 0 additions & 1 deletion resources/assets/src/components/ModalInput.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type React from 'react';

export type Props = {
readonly inputType?: string;
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/components/Pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import PaginationItem from './PaginationItem';
import {t} from '@/scripts/i18n';

Expand Down
1 change: 0 additions & 1 deletion resources/assets/src/components/PaginationItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type React from 'react';

type Properties = {
readonly disabled?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/components/Toast.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @jsxImportSource @emotion/react */
import type React from 'react';

import {useState, useEffect} from 'react';
import {css} from '@emotion/react';

Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/components/Viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @jsxImportSource @emotion/react */
import type React from 'react';

import {useState, useEffect, useRef} from 'react';
import {useMeasure} from 'react-use';
import {css} from '@emotion/react';
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/scripts/cli.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useEffect, useRef} from 'react';
import {useEffect, useRef} from 'react';
import ReactDOM from 'react-dom';
import styled from '@emotion/styled';
import {Terminal} from 'xterm';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import clsx from 'clsx';
import {Box} from './styles';
import {t} from '@/scripts/i18n';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState} from 'react';
import {useState} from 'react';
import {t} from '@/scripts/i18n';
import {TextureType} from '@/scripts/types';
import Modal from '@/components/Modal';
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/views/admin/PlayersManagement/Row.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import {t} from '@/scripts/i18n';
import type {Player} from '@/scripts/types';
import ButtonEdit from '@/components/ButtonEdit';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect, useLayoutEffect} from 'react';
import {useState, useEffect, useLayoutEffect} from 'react';
import {useImmer} from 'use-immer';
import Header from '../UsersManagement/Header';
import Card from './Card';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import styled from '@emotion/styled';
import clsx from 'clsx';
import type {Plugin} from './types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect} from 'react';
import {useState, useEffect} from 'react';
import {useImmer} from 'use-immer';
import InfoBox from './InfoBox';
import type {Plugin} from './types';
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/views/admin/PluginsMarket/Row.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import type {Plugin} from './types';
import {t} from '@/scripts/i18n';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import styled from '@emotion/styled';
import {type Report, Status} from './types';
import {t} from '@/scripts/i18n';
Expand Down
1 change: 0 additions & 1 deletion resources/assets/src/views/admin/Translations/Row.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from '@emotion/styled';
import type React from 'react';
import type {Line} from './types';
import {t} from '@/scripts/i18n';

Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/views/admin/UsersManagement/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import clsx from 'clsx';
import {Box, Icon, InfoTable} from './styles';
import {
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/views/admin/UsersManagement/Row.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from 'react';

import {
humanizePermission,
verificationStatusText,
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/views/admin/UsersManagement/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect, useLayoutEffect} from 'react';
import {useState, useEffect, useLayoutEffect} from 'react';
import {useImmer} from 'use-immer';
import Header from './Header';
import Card from './Card';
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/src/views/auth/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useRef, useEffect} from 'react';
import {useState, useRef, useEffect} from 'react';
import useBlessingExtra from '@/scripts/hooks/useBlessingExtra';
import useEmitMounted from '@/scripts/hooks/useEmitMounted';
import {t} from '@/scripts/i18n';
Expand Down
Loading

0 comments on commit 643f73c

Please sign in to comment.