Skip to content

Commit

Permalink
DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneLem committed Jan 12, 2023
1 parent 3748f4c commit d78bd2a
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/emoji-mart/src/components/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -723,20 +723,13 @@ export default class Picker extends Component {
</div>

<div class={`margin-${this.dir[0]}`}>
{emoji ? (
<div class={`padding-${this.dir[2]} align-${this.dir[0]}`}>
<div class="preview-title ellipsis">{emoji.name}</div>
<div class="preview-subtitle ellipsis color-c">
{emoji.skins[0].shortcodes}
</div>
</div>
) : noSearchResults ? (
{emoji || noSearchResults ? (
<div class={`padding-${this.dir[2]} align-${this.dir[0]}`}>
<div class="preview-title ellipsis">
{I18n.search_no_results_1}
{emoji ? emoji.name : I18n.search_no_results_1}
</div>
<div class="preview-subtitle ellipsis color-c">
{I18n.search_no_results_2}
{emoji ? emoji.skins[0].shortcodes : I18n.search_no_results_2}
</div>
</div>
) : (
Expand Down

0 comments on commit d78bd2a

Please sign in to comment.