mirror of
https://github.com/urbit/shrub.git
synced 2024-12-11 11:02:25 +03:00
collections: address L review
This commit is contained in:
parent
5f7e4c34b2
commit
8bfbef1b45
@ -100,9 +100,6 @@ class RemoteContent extends Component<RemoteContentProps, RemoteContentState> {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
}
|
||||
|
||||
onLoad = () => {
|
||||
window.requestAnimationFrame(() => {
|
||||
const { restore } = this;
|
||||
@ -257,35 +254,37 @@ return;
|
||||
if (!this.state.embed || this.state.embed?.html === '') {
|
||||
this.loadOembed();
|
||||
}
|
||||
const renderEmbed = !(this.state.embed !== 'error' && this.state.embed?.html);
|
||||
const embed = <Box
|
||||
mb={2}
|
||||
width='100%'
|
||||
flexShrink={0}
|
||||
display={this.state.unfold ? 'block' : 'none'}
|
||||
className='embed-container'
|
||||
style={style}
|
||||
onLoad={this.onLoad}
|
||||
{...oembedProps}
|
||||
{...props}
|
||||
>
|
||||
<TruncatedText
|
||||
display={(renderUrl && this.state.embed?.title && this.state.embed.title !== url) ? 'inline-block' : 'none'}
|
||||
fontWeight='bold' width='100%'
|
||||
>
|
||||
{this.state.embed?.title}
|
||||
</TruncatedText>
|
||||
{this.state.embed && this.state.embed.html && this.state.unfold
|
||||
? <EmbedContainer markup={this.state.embed.html}>
|
||||
<div className="embed-container" ref={(el) => {
|
||||
this.onLoad();
|
||||
this.containerRef = el;
|
||||
}}
|
||||
dangerouslySetInnerHTML={{ __html: this.state.embed.html }}
|
||||
></div>
|
||||
</EmbedContainer>
|
||||
: null}
|
||||
</Box>;
|
||||
const renderEmbed = !(this.state.embed !== 'error' && this.state.embed?.html);
|
||||
const embed = (
|
||||
<Box
|
||||
mb={2}
|
||||
width='100%'
|
||||
flexShrink={0}
|
||||
display={this.state.unfold ? 'block' : 'none'}
|
||||
className='embed-container'
|
||||
style={style}
|
||||
onLoad={this.onLoad}
|
||||
{...oembedProps}
|
||||
{...props}
|
||||
>
|
||||
<TruncatedText
|
||||
display={(renderUrl && this.state.embed?.title && this.state.embed.title !== url) ? 'inline-block' : 'none'}
|
||||
fontWeight='bold' width='100%'
|
||||
>
|
||||
{this.state.embed?.title}
|
||||
</TruncatedText>
|
||||
{this.state.embed && this.state.embed.html && this.state.unfold
|
||||
? <EmbedContainer markup={this.state.embed.html}>
|
||||
<div className="embed-container" ref={(el) => {
|
||||
this.onLoad();
|
||||
this.containerRef = el;
|
||||
}}
|
||||
dangerouslySetInnerHTML={{ __html: this.state.embed.html }}
|
||||
></div>
|
||||
</EmbedContainer>
|
||||
: null}
|
||||
</Box>
|
||||
);
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { ChangeEvent, useCallback, useMemo, useState } from 'react';
|
||||
import React, { ChangeEvent, useCallback, useMemo } from 'react';
|
||||
|
||||
import { Text, Box, BaseInput, BaseInputProps } from '@tlon/indigo-react';
|
||||
import { Text, Box, BaseInput } from '@tlon/indigo-react';
|
||||
import { PropFunc } from '~/types';
|
||||
|
||||
type StatelessUrlInputProps = PropFunc<typeof BaseInput> & {
|
||||
@ -17,7 +17,6 @@ type StatelessUrlInputProps = PropFunc<typeof BaseInput> & {
|
||||
export function StatelessUrlInput(props: StatelessUrlInputProps) {
|
||||
const {
|
||||
value,
|
||||
error,
|
||||
focussed,
|
||||
disabled,
|
||||
onChange = () => {},
|
||||
@ -27,8 +26,6 @@ export function StatelessUrlInput(props: StatelessUrlInputProps) {
|
||||
...rest
|
||||
} = props;
|
||||
|
||||
console.log(focussed);
|
||||
|
||||
const placeholder = useMemo(
|
||||
() => (
|
||||
<Text
|
||||
|
Loading…
Reference in New Issue
Block a user