Skip to content

Commit

Permalink
Refactor tag not found to use passed props
Browse files Browse the repository at this point in the history
  • Loading branch information
samj1912 committed Mar 12, 2018
1 parent 81c54ec commit 60217b4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/MusicBrainz/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ sub TO_JSON {
new_edit_notes
server_details
server_languages
tag
to_merge
);

Expand Down
2 changes: 1 addition & 1 deletion lib/MusicBrainz/Server/Controller/Tag.pm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ sub not_found : Private
$c->stash(
current_view => 'Node',
component_path => 'tag/NotFound.js',
tag => $tagname,
component_props => {tag => $tagname}
);
$c->detach;
}
Expand Down
4 changes: 2 additions & 2 deletions root/tag/NotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const React = require('react');
const NotFound = require('../components/NotFound');
const {l} = require('../static/scripts/common/i18n');

const TagNotFound = () => (
const TagNotFound = ({tag}: {+tag: string}) => (
<NotFound title={l('Tag Not Used')}>
<p>
{l('No MusicBrainz entities have yet been tagged with "{tag}".', {tag: $c.stash.tag})}
{l('No MusicBrainz entities have yet been tagged with "{tag}".', {tag: tag})}
</p>
<p>
{l('If you wish to use this tag, please {url|search} for the entity first and apply the tag using the sidebar.',
Expand Down
1 change: 0 additions & 1 deletion root/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ type CatalystUserT = {|
|};

type CatalystStashT = {|
+tag?: string,
|};

type CommentRoleT = {|+comment: string|};
Expand Down

0 comments on commit 60217b4

Please sign in to comment.