Another large update for all components
reorganization, linting, updating file imports, consolidation warning: there will be errors in this commit todo: update webpack, add missing styles, scss files, consolidate group page components.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import SectionHeadlineBar from '../../../../components/section_headline_bar';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
value: state.getIn(['search', 'value']),
|
||||
@@ -9,7 +7,7 @@ const mapStateToProps = state => ({
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Header extends ImmutablePureComponent {
|
||||
class Header extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
value: PropTypes.string,
|
||||
@@ -42,12 +40,15 @@ class Header extends ImmutablePureComponent {
|
||||
</h1>
|
||||
</div>
|
||||
<div className='search-header__type-filters'>
|
||||
<div className='account__section-headline'>
|
||||
<div className='search-header__type-filters-tabs'>
|
||||
<NavLink to='/search' activeClassName='active'>
|
||||
<FormattedMessage id='search_results.top' defaultMessage='Top' />
|
||||
</NavLink>
|
||||
</div>
|
||||
<div className='search-header__type-filters-tabs'>
|
||||
<SectionHeadlineBar
|
||||
items={[
|
||||
{
|
||||
to: '/search',
|
||||
title: <FormattedMessage id='search_results.top' defaultMessage='Top' />
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,32 +14,30 @@
|
||||
|
||||
&__title-text {
|
||||
color: $primary-text-color;
|
||||
font-size: 27px;
|
||||
font-weight: bold;
|
||||
line-height: 32px;
|
||||
overflow: hidden;
|
||||
padding-left: 20px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
|
||||
@include text-sizing(27px, bold, 32px);
|
||||
@include text-overflow;
|
||||
@include margin-center;
|
||||
|
||||
@media (min-width:895px) and (max-width:1190px) {
|
||||
max-width: 900px;
|
||||
}
|
||||
}
|
||||
|
||||
&__type-filters-tabs {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
|
||||
@include margin-center;
|
||||
|
||||
@media screen and (max-width:895px) {
|
||||
max-width: 580px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width:895px) and (max-width:1190px) {
|
||||
|
||||
&__title-text,
|
||||
&__type-filters-tabs {
|
||||
@media (min-width:895px) and (max-width:1190px) {
|
||||
max-width: 900px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1 @@
|
||||
import SearchContainer from 'gabsocial/features/compose/containers/search_container';
|
||||
import SearchResultsContainer from 'gabsocial/features/compose/containers/search_results_container';
|
||||
|
||||
const Search = () => (
|
||||
<div className='column search-page'>
|
||||
<SearchContainer />
|
||||
|
||||
<div className='drawer__pager'>
|
||||
<div className='drawer__inner darker'>
|
||||
<SearchResultsContainer />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
export default Search;
|
||||
export { default } from './search';
|
||||
22
app/javascript/gabsocial/features/search/search.js
Normal file
22
app/javascript/gabsocial/features/search/search.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import SearchContainer from '../compose/containers/search_container';
|
||||
import SearchResultsContainer from '../compose/containers/search_results_container';
|
||||
|
||||
|
||||
// : TODO : test
|
||||
export default class Search extends PureComponent {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className='column search-page'>
|
||||
<SearchContainer />
|
||||
|
||||
<div className='drawer__pager'>
|
||||
<div className='drawer__inner darker'>
|
||||
<SearchResultsContainer />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user