Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/table-base
Browse files Browse the repository at this point in the history
  • Loading branch information
lindapaiste authored Aug 14, 2023
2 parents cc6d762 + 0bd139b commit 1730841
Show file tree
Hide file tree
Showing 8 changed files with 249 additions and 300 deletions.
25 changes: 19 additions & 6 deletions client/modules/IDE/components/AddToCollectionList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,32 @@ import { Helmet } from 'react-helmet';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { withTranslation } from 'react-i18next';

import styled from 'styled-components';
import * as ProjectActions from '../actions/project';
import * as ProjectsActions from '../actions/projects';
import * as CollectionsActions from '../actions/collections';
import * as ToastActions from '../actions/toast';
import getSortedCollections from '../selectors/collections';
import Loader from '../../App/components/loader';
import QuickAddList from './QuickAddList';
import { remSize } from '../../../theme';

const projectInCollection = (project, collection) =>
collection.items.find((item) => item.projectId === project.id) != null;

export const CollectionAddSketchWrapper = styled.div`
width: ${remSize(600)};
max-width: 100%;
overflow: auto;
`;

export const QuickAddWrapper = styled.div`
width: ${remSize(600)};
max-width: 100%;
padding: ${remSize(24)};
height: 100%;
`;

class CollectionList extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -84,15 +98,14 @@ class CollectionList extends React.Component {
}

return (
<div className="collection-add-sketch">
<div className="quick-add-wrapper">
<CollectionAddSketchWrapper>
<QuickAddWrapper>
<Helmet>
<title>{this.getTitle()}</title>
</Helmet>

{content}
</div>
</div>
</QuickAddWrapper>
</CollectionAddSketchWrapper>
);
}
}
Expand Down
12 changes: 8 additions & 4 deletions client/modules/IDE/components/AddToCollectionSketchList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import * as ToastActions from '../actions/toast';
import getSortedSketches from '../selectors/projects';
import Loader from '../../App/components/loader';
import QuickAddList from './QuickAddList';
import {
CollectionAddSketchWrapper,
QuickAddWrapper
} from './AddToCollectionList';

class SketchList extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -80,14 +84,14 @@ class SketchList extends React.Component {
}

return (
<div className="collection-add-sketch">
<div className="quick-add-wrapper">
<CollectionAddSketchWrapper>
<QuickAddWrapper>
<Helmet>
<title>{this.getSketchesTitle()}</title>
</Helmet>
{content}
</div>
</div>
</QuickAddWrapper>
</CollectionAddSketchWrapper>
);
}
}
Expand Down
Loading

0 comments on commit 1730841

Please sign in to comment.