ProjectSectionContainer.tsx 724 B

123456789101112131415161718192021222324252627282930
  1. import React, { Component } from 'react';
  2. import styled from 'styled-components';
  3. import { Context } from '../../../shared/Context';
  4. import ProjectSection from './ProjectSection';
  5. type PropsType = {
  6. setCurrentView: (x: string, viewData?: any) => void,
  7. };
  8. type StateType = {
  9. };
  10. // Props in context to project section to trigger update on context change
  11. export default class ProjectSectionContainer extends Component<PropsType, StateType> {
  12. state = {
  13. }
  14. render() {
  15. return (
  16. <ProjectSection
  17. currentProject={this.context.currentProject}
  18. projects={this.context.projects}
  19. setCurrentView={this.props.setCurrentView}
  20. />
  21. );
  22. }
  23. }
  24. ProjectSectionContainer.contextType = Context;