From 81ef21a0c802f1d905f37a2a818544a8b400793c Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Sat, 25 Feb 2023 14:34:32 +0100 Subject: [Glitch] Rename JSX files with proper `.jsx` extension Port 44a7d87cb1f5df953b6c14c16c59e2e4ead1bcb9 to glitch-soc Signed-off-by: Claire --- .../glitch/features/ui/components/column.js | 75 ---------------------- 1 file changed, 75 deletions(-) delete mode 100644 app/javascript/flavours/glitch/features/ui/components/column.js (limited to 'app/javascript/flavours/glitch/features/ui/components/column.js') diff --git a/app/javascript/flavours/glitch/features/ui/components/column.js b/app/javascript/flavours/glitch/features/ui/components/column.js deleted file mode 100644 index cc2abc43a..000000000 --- a/app/javascript/flavours/glitch/features/ui/components/column.js +++ /dev/null @@ -1,75 +0,0 @@ -import React from 'react'; -import ColumnHeader from './column_header'; -import PropTypes from 'prop-types'; -import { debounce } from 'lodash'; -import { scrollTop } from 'flavours/glitch/scroll'; -import { isMobile } from 'flavours/glitch/is_mobile'; - -export default class Column extends React.PureComponent { - - static propTypes = { - heading: PropTypes.string, - icon: PropTypes.string, - children: PropTypes.node, - active: PropTypes.bool, - hideHeadingOnMobile: PropTypes.bool, - name: PropTypes.string, - bindToDocument: PropTypes.bool, - }; - - handleHeaderClick = () => { - const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable'); - - if (!scrollable) { - return; - } - - this._interruptScrollAnimation = scrollTop(scrollable); - }; - - scrollTop () { - const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable'); - - if (!scrollable) { - return; - } - - this._interruptScrollAnimation = scrollTop(scrollable); - } - - - handleScroll = debounce(() => { - if (typeof this._interruptScrollAnimation !== 'undefined') { - this._interruptScrollAnimation(); - } - }, 200); - - setRef = (c) => { - this.node = c; - }; - - render () { - const { heading, icon, children, active, hideHeadingOnMobile, name } = this.props; - - const showHeading = heading && (!hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth))); - - const columnHeaderId = showHeading && heading.replace(/ /g, '-'); - const header = showHeading && ( - - ); - return ( -
- {header} - {children} -
- ); - } - -} -- cgit