Skip to content

Commit

Permalink
userdashboard: add skeleton of react component
Browse files Browse the repository at this point in the history
  • Loading branch information
philli-m committed Jan 28, 2021
1 parent d808d1e commit 258d6d5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
3 changes: 3 additions & 0 deletions adhocracy-plus/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import * as ReactDocuments from '../../../apps/documents/assets/react_documents.
import * as ReactPolls from '../../../apps/polls/assets/react_polls.jsx'
import * as ReactInteractiveEvents from 'a4_candy_interactive_events'
import * as ReactLanguageChoice from '../../../apps/organisations/assets/react_language_choice.jsx'
import * as ReactModerationProjects from 'a4_candy_userdashboard/react_moderation_projects.jsx'

function init () {
ReactWidget.initialise('a4', 'comment', ReactComments.renderComment)
Expand All @@ -39,6 +40,8 @@ function init () {
ReactWidget.initialise('aplus', 'questions', ReactInteractiveEvents.renderLiveQuestions)
ReactWidget.initialise('aplus', 'present', ReactInteractiveEvents.renderLiveQuestionsPresent)

ReactWidget.initialise('aplus', 'moderation_projects', ReactModerationProjects.renderModerationProjects)

ReactWidget.initialise('euth', 'language-choice', ReactLanguageChoice.renderLanguageChoice)

$('.timeline-carousel__item').slick({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var React = require('react')
var ReactDOM = require('react-dom')

class ModerationProjects extends React.Component {
render () {
return (
<div className="row mb-2">
<div className="col-12">
<h2>Projects</h2>
<span>project</span>
</div>
</div>
)
}
}

module.exports.renderModerationProjects = function (el) {
ReactDOM.render(
<ModerationProjects />,
el
)
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{% extends "a4_candy_userdashboard/base_userdashboard.html" %}

{% block dashboard_content %}{% endblock %}
{% block dashboard_content %}
<div class=""
id=""
data-aplus-widget="moderation_projects" >
</div>
{% endblock %}

0 comments on commit 258d6d5

Please sign in to comment.