React/Preact compatibility cleanup
This commit is contained in:
parent
7faceb41e4
commit
a9046c8dfb
|
@ -1,4 +1,4 @@
|
|||
import React from 'preact/compat';
|
||||
import React from 'react';
|
||||
|
||||
/**
|
||||
* Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'preact/compat';
|
||||
import { useState, useRef, useEffect } from 'preact/hooks';
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { getWidget, DEFAULT_WIDGETS } from './widgets';
|
||||
import { TrashIcon } from '../Icons';
|
||||
import setPosition from './setPosition';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useEffect } from 'preact/hooks';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function useClickOutside(ref, callback) {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Component } from 'preact/compat';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
export default class WrappedWidget extends Component {
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'preact/compat';
|
||||
import { useState } from 'preact/hooks';
|
||||
import React, { useState } from 'react';
|
||||
import TimeAgo from 'timeago-react';
|
||||
import DropdownMenu from './DropdownMenu';
|
||||
import TextEntryField from './TextEntryField';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'preact/compat';
|
||||
import React from 'react';
|
||||
import Comment from './Comment';
|
||||
import TextEntryField from './TextEntryField';
|
||||
import i18n from '../../../i18n';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'preact/compat';
|
||||
import { useRef } from 'preact/hooks';
|
||||
import React, { useRef } from 'react';
|
||||
import useClickOutside from '../../useClickOutside';
|
||||
import i18n from '../../../i18n';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'preact/compat';
|
||||
import React from 'react';
|
||||
import Select from 'react-select';
|
||||
|
||||
export const PURPOSES = [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Component } from 'preact/compat';
|
||||
import React, { Component } from 'react';
|
||||
import TextareaAutosize from 'react-autosize-textarea';
|
||||
import i18n from '../../../i18n';
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import CommentWidget from './comment/CommentWidget'
|
||||
import TagWidget from './tag/TagWidget';
|
||||
import WrappedWidget from './WrappedWidget';
|
||||
|
||||
/**
|
||||
* We'll add React to the global window, so that
|
||||
* We'll add React and ReactDOM to the global window, so that
|
||||
* plugins can use it without re-bundling. Also,
|
||||
* without this, hooks won't work!
|
||||
*/
|
||||
window.React = React;
|
||||
window.ReactDOM = ReactDOM;
|
||||
|
||||
/** Standard widgets included by default **/
|
||||
const BUILTIN_WIDGETS = {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'preact/compat';
|
||||
import { useState } from 'preact/hooks';
|
||||
import React, { useState } from 'react';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
import { CloseIcon } from '../../../Icons';
|
||||
import i18n from '../../../i18n';
|
||||
|
|
Loading…
Reference in New Issue