(prevProps: Props)
| 72 | } |
| 73 | |
| 74 | public componentDidUpdate(prevProps: Props) { |
| 75 | const { chat, message, teamId } = this.props; |
| 76 | |
| 77 | if (chat && prevProps.chat && prevProps.chat.chatId !== chat.chatId) { |
| 78 | this.storageKey = `content-${teamId}-${chat ? chat.chatId : 'new-chat'}-${ |
| 79 | message ? message.messageId : 'new-message' |
| 80 | }`; |
| 81 | |
| 82 | const draftContent = |
| 83 | (typeof localStorage !== 'undefined' && localStorage.getItem(this.storageKey)) || null; |
| 84 | |
| 85 | if (draftContent) { |
| 86 | this.setState({ content: draftContent }); |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | public render() { |
| 92 | const { |
nothing calls this directly
no outgoing calls
no test coverage detected