use only unpkg/preact + htm consistently for all components
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { h, Component } from 'https://unpkg.com/preact?module';
|
||||
import htm from 'https://unpkg.com/htm?module';
|
||||
// Initialize htm with Preact
|
||||
const html = htm.bind(h);
|
||||
|
||||
import Message from './message.js';
|
||||
|
||||
@@ -6,7 +6,7 @@ and here:
|
||||
https://stackoverflow.com/questions/22677931/react-js-onchange-event-for-contenteditable/27255103#27255103
|
||||
|
||||
*/
|
||||
import { Component, createRef, createElement } from 'https://unpkg.com/preact?module';
|
||||
import { Component, createRef, h } from 'https://unpkg.com/preact?module';
|
||||
|
||||
function replaceCaret(el) {
|
||||
// Place the caret at the end of the element
|
||||
@@ -109,7 +109,7 @@ export default class ContentEditable extends Component {
|
||||
|
||||
render(props) {
|
||||
const { html, innerRef } = props;
|
||||
return createElement(
|
||||
return h(
|
||||
'div',
|
||||
{
|
||||
...props,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { html, Component } from "https://unpkg.com/htm/preact/index.mjs?module";
|
||||
import { h, Component } from 'https://unpkg.com/preact?module';
|
||||
import htm from 'https://unpkg.com/htm?module';
|
||||
const html = htm.bind(h);
|
||||
|
||||
import { messageBubbleColorForString } from '../../utils/user-colors.js';
|
||||
import { formatMessageText } from '../../utils/chat.js';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { h, Component, createRef } from 'https://unpkg.com/preact?module';
|
||||
import htm from 'https://unpkg.com/htm?module';
|
||||
// Initialize htm with Preact
|
||||
const html = htm.bind(h);
|
||||
|
||||
import { generateAvatar, setLocalStorage } from '../../utils/helpers.js';
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { html } from "https://unpkg.com/htm/preact/index.mjs?module";
|
||||
import { h } from 'https://unpkg.com/preact?module';
|
||||
import htm from 'https://unpkg.com/htm?module';
|
||||
const html = htm.bind(h);
|
||||
import { SOCIAL_PLATFORMS } from '../utils/social.js';
|
||||
import { classNames } from '../utils/helpers.js';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user