1
0
mirror of https://github.com/flarum/core.git synced 2025-08-16 13:24:11 +02:00

Don't accept unnecessary vnode arguments in view

This commit is contained in:
Alexander Skvortsov
2020-08-15 19:51:29 -04:00
committed by Franz Liedke
parent e699ada1cc
commit 88bc291c86
7 changed files with 7 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ export default class Modal extends Component {
this.attrs.onshow(() => this.onready()); this.attrs.onshow(() => this.onready());
} }
view(vnode) { view() {
if (this.alertAttrs) { if (this.alertAttrs) {
this.alertAttrs.dismissible = false; this.alertAttrs.dismissible = false;
} }

View File

@@ -6,7 +6,7 @@ import Component from '../Component';
* overwrite the previous one. * overwrite the previous one.
*/ */
export default class ModalManager extends Component { export default class ModalManager extends Component {
view(vnode) { view() {
const modal = this.attrs.state.modal; const modal = this.attrs.state.modal;
return ( return (

View File

@@ -9,7 +9,7 @@ import Component from '../Component';
* - `text` * - `text`
*/ */
export default class Placeholder extends Component { export default class Placeholder extends Component {
view(vnode) { view() {
return ( return (
<div className="Placeholder"> <div className="Placeholder">
<p>{this.attrs.text}</p> <p>{this.attrs.text}</p>

View File

@@ -12,7 +12,7 @@ import Placeholder from '../../common/components/Placeholder';
* - `state` A DiscussionListState object that represents the discussion lists's state. * - `state` A DiscussionListState object that represents the discussion lists's state.
*/ */
export default class DiscussionList extends Component { export default class DiscussionList extends Component {
view(vnode) { view() {
const state = this.attrs.state; const state = this.attrs.state;
const params = state.getParams(); const params = state.getParams();

View File

@@ -54,7 +54,7 @@ export default class DiscussionListItem extends Component {
}; };
} }
view(vnode) { view() {
const discussion = this.attrs.discussion; const discussion = this.attrs.discussion;
const user = discussion.user(); const user = discussion.user();
const isUnread = discussion.isUnread(); const isUnread = discussion.isUnread();

View File

@@ -22,7 +22,7 @@ export default class PostStreamScrubber extends Component {
this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true })); this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));
} }
view(vnode) { view() {
const count = this.stream.count(); const count = this.stream.count();
// Index is left blank for performance reasons, it is filled in in updateScubberValues // Index is left blank for performance reasons, it is filled in in updateScubberValues

View File

@@ -23,7 +23,7 @@ export default function alertEmailConfirmation(app) {
this.content = app.translator.trans('core.forum.user_email_confirmation.resend_button'); this.content = app.translator.trans('core.forum.user_email_confirmation.resend_button');
} }
view(vnode) { view() {
return ( return (
<Button class="Button Button--link" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.disabled}> <Button class="Button Button--link" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.disabled}>
{this.content} {this.content}