/*
 * Copyright (C) 2021 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

import React from 'react'
import ReactDOM from 'react-dom'

export default function renderDiscussionPosts(env, elt) {
  ReactDOM.render(<h1>New Discussion Post Entry Point</h1>, elt)
}

@@ -693,16 +693,302 @@
 %3E.%0A */%0A%0A
+import AlertManager from '@canvas/alerts/react/AlertManager'%0Aimport %7BApolloProvider, createClient%7D from '@canvas/apollo'%0Aimport ErrorBoundary from '@canvas/error-boundary'%0Aimport errorShipUrl from '@canvas/images/ErrorShip.svg'%0Aimport GenericErrorPage from '@canvas/generic-error-page'%0A
 import R
@@ -1005,16 +1005,16 @@
 'react'%0A
-
 import R
@@ -1039,16 +1039,47 @@
 t-dom'%0A%0A
+const client = createClient()%0A%0A
 export d
@@ -1150,53 +1150,402 @@
 der(
-%3Ch1%3ENew Discussion Post Entry Point%3C/h1%3E,
+%0A    %3CApolloProvider client=%7Bclient%7D%3E%0A      %3CErrorBoundary%0A        errorComponent=%7B%0A          %3CGenericErrorPage%0A            imageUrl=%7BerrorShipUrl%7D%0A            errorCategory=%22Discussion Topic Post Error Page%22%0A          /%3E%0A        %7D%0A      %3E%0A        %3CAlertManager%3E%0A          %3Ch1%3ENew Discussion Post Entry Point%3C/h1%3E%0A        %3C/AlertManager%3E%0A      %3C/ErrorBoundary%3E%0A    %3C/ApolloProvider%3E,%0A   
  elt
+%0A  
 )%0A%7D%0A

add apollo client to discussion topics post project