"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[1300],{21300:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var s=n(37270),r=n(32446),a=n(65952),c=n(14776),u=n(7430),o=n(11638),i=n(62688),d=n.n(i),p=(n(17046),n(43813),n(3188),n(6552),n(36418)),m=n.n(p);const f=e=>{const t=(0,p.useRef)(!1),[n,s]=(0,p.useState)(!1);(0,p.useEffect)((()=>(t.current=!0,()=>{t.current=!1})),[]);const r=(0,p.useCallback)((async()=>{const n=e.match.params.postid;await e.actions.focusPost(n,e.returnTo,e.currentUserId),t.current&&s(!0)}),[e.match.params.postid,e.returnTo,e.currentUserId,e.actions]);return(0,p.useEffect)((()=>{document.body.classList.add("app__body"),r()}),[r]),n&&e.channelId&&e.teamName?null:m().createElement("div",{id:"app-content",className:"app__content"})};f.propTypes={channelId:d().string.isRequired,returnTo:d().string.isRequired,teamName:d().string,actions:d().shape({focusPost:d().func.isRequired}).isRequired,currentUserId:d().string.isRequired};const l=(0,p.memo)(f),h=(0,s.connect)((function(e){const t=(0,c.H7)(e),n=(0,a.Lw)(e),s=(0,u.WR)(e);return{channelId:n?n.id:"",teamName:t?t.name:"",currentUserId:s}}),(function(e){return{actions:(0,r.zH)({focusPost:o.V},e)}}))(l)}}]);
//# sourceMappingURL=1300.5b5cadf9d9701d10080f.js.map