0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-01 17:22:42 +00:00

[NFC] Add display name for custom React components

This improves readability of "Components" tab from React Development Tools extension for Chrome
This commit is contained in:
Alexey Sachkov
2021-12-29 21:18:54 +03:00
parent 7b19bbb1a7
commit 8a3f52b704
23 changed files with 28 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ const createClass = require('create-react-class');
const Nav = require('naturalcrit/nav/nav.jsx');
const Account = createClass({
displayName : 'AccountNavItem',
getInitialState : function() {
return {
url : ''

View File

@@ -7,6 +7,7 @@ const MAX_TITLE_LENGTH = 50;
const EditTitle = createClass({
displayName : 'EditTitleNavItem',
getDefaultProps : function() {
return {
title : '',

View File

@@ -6,6 +6,7 @@ const Nav = require('naturalcrit/nav/nav.jsx');
const PatreonNavItem = require('./patreon.navitem.jsx');
const Navbar = createClass({
displayName : 'Navbar',
getInitialState : function() {
return {
//showNonChromeWarning : false,

View File

@@ -10,7 +10,7 @@ const VIEW_KEY = 'homebrewery-recently-viewed';
const RecentItems = createClass({
DisplayName : 'RecentItems',
getDefaultProps : function() {
return {
storageKey : '',

View File

@@ -8,6 +8,7 @@ const MAIN_URL = 'https://www.reddit.com/r/UnearthedArcana/submit?selftext=true'
const RedditShare = createClass({
displayName : 'RedditShareNavItem',
getDefaultProps : function() {
return {
brew : {