Fix bug when clicking categories

This commit is contained in:
Thomas Forgione 2022-02-05 21:12:20 +01:00
parent 312f6e3c72
commit 42ee821b08
2 changed files with 40 additions and 40 deletions

View File

@ -129,7 +129,7 @@ header model =
Border.width 1 Border.width 1
, Border.rounded 5 , Border.rounded 5
] ]
{ label = Element.el [] (emoji (Emoji.categoryEmoji x)) { label = Element.el [] (Element.text (Emoji.categoryEmoji x).unicode)
, onPress = Just (CategoryClicked x) , onPress = Just (CategoryClicked x)
} }
) )

View File

@ -15747,43 +15747,6 @@ var $mdgriffith$elm_ui$Element$el = F2(
_List_fromArray( _List_fromArray(
[child]))); [child])));
}); });
var $author$project$Main$Copy = function (a) {
return {$: 'Copy', a: a};
};
var $mdgriffith$elm_ui$Internal$Model$AlignX = function (a) {
return {$: 'AlignX', a: a};
};
var $mdgriffith$elm_ui$Internal$Model$CenterX = {$: 'CenterX'};
var $mdgriffith$elm_ui$Element$centerX = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$CenterX);
var $mdgriffith$elm_ui$Internal$Model$AlignY = function (a) {
return {$: 'AlignY', a: a};
};
var $mdgriffith$elm_ui$Internal$Model$CenterY = {$: 'CenterY'};
var $mdgriffith$elm_ui$Element$centerY = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$CenterY);
var $mdgriffith$elm_ui$Element$htmlAttribute = $mdgriffith$elm_ui$Internal$Model$Attr;
var $mdgriffith$elm_ui$Internal$Model$Text = function (a) {
return {$: 'Text', a: a};
};
var $mdgriffith$elm_ui$Element$text = function (content) {
return $mdgriffith$elm_ui$Internal$Model$Text(content);
};
var $elm$html$Html$Attributes$title = $elm$html$Html$Attributes$stringProperty('title');
var $author$project$Main$emoji = function (e) {
return A2(
$mdgriffith$elm_ui$Element$Input$button,
_List_fromArray(
[
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$title(e.name)),
$mdgriffith$elm_ui$Element$centerX,
$mdgriffith$elm_ui$Element$centerY
]),
{
label: $mdgriffith$elm_ui$Element$text(e.unicode),
onPress: $elm$core$Maybe$Just(
$author$project$Main$Copy(e.unicode))
});
};
var $mdgriffith$elm_ui$Internal$Model$Fill = function (a) { var $mdgriffith$elm_ui$Internal$Model$Fill = function (a) {
return {$: 'Fill', a: a}; return {$: 'Fill', a: a};
}; };
@ -15811,6 +15774,7 @@ var $author$project$Main$modelSearch = function (model) {
return $elm$core$Maybe$Nothing; return $elm$core$Maybe$Nothing;
} }
}; };
var $mdgriffith$elm_ui$Element$htmlAttribute = $mdgriffith$elm_ui$Internal$Model$Attr;
var $author$project$Main$onEnter = function (msg) { var $author$project$Main$onEnter = function (msg) {
return $mdgriffith$elm_ui$Element$htmlAttribute( return $mdgriffith$elm_ui$Element$htmlAttribute(
A2( A2(
@ -15904,6 +15868,12 @@ var $mdgriffith$elm_ui$Element$spacing = function (x) {
x, x,
x)); x));
}; };
var $mdgriffith$elm_ui$Internal$Model$Text = function (a) {
return {$: 'Text', a: a};
};
var $mdgriffith$elm_ui$Element$text = function (content) {
return $mdgriffith$elm_ui$Internal$Model$Text(content);
};
var $mdgriffith$elm_ui$Element$Input$TextInputNode = function (a) { var $mdgriffith$elm_ui$Element$Input$TextInputNode = function (a) {
return {$: 'TextInputNode', a: a}; return {$: 'TextInputNode', a: a};
}; };
@ -16883,8 +16853,8 @@ var $author$project$Main$header = function (model) {
label: A2( label: A2(
$mdgriffith$elm_ui$Element$el, $mdgriffith$elm_ui$Element$el,
_List_Nil, _List_Nil,
$author$project$Main$emoji( $mdgriffith$elm_ui$Element$text(
$author$project$Emoji$categoryEmoji(x))), $author$project$Emoji$categoryEmoji(x).unicode)),
onPress: $elm$core$Maybe$Just( onPress: $elm$core$Maybe$Just(
$author$project$Main$CategoryClicked(x)) $author$project$Main$CategoryClicked(x))
}); });
@ -17169,6 +17139,36 @@ var $mdgriffith$elm_ui$Element$layoutWith = F3(
}); });
var $mdgriffith$elm_ui$Element$layout = $mdgriffith$elm_ui$Element$layoutWith( var $mdgriffith$elm_ui$Element$layout = $mdgriffith$elm_ui$Element$layoutWith(
{options: _List_Nil}); {options: _List_Nil});
var $author$project$Main$Copy = function (a) {
return {$: 'Copy', a: a};
};
var $mdgriffith$elm_ui$Internal$Model$AlignX = function (a) {
return {$: 'AlignX', a: a};
};
var $mdgriffith$elm_ui$Internal$Model$CenterX = {$: 'CenterX'};
var $mdgriffith$elm_ui$Element$centerX = $mdgriffith$elm_ui$Internal$Model$AlignX($mdgriffith$elm_ui$Internal$Model$CenterX);
var $mdgriffith$elm_ui$Internal$Model$AlignY = function (a) {
return {$: 'AlignY', a: a};
};
var $mdgriffith$elm_ui$Internal$Model$CenterY = {$: 'CenterY'};
var $mdgriffith$elm_ui$Element$centerY = $mdgriffith$elm_ui$Internal$Model$AlignY($mdgriffith$elm_ui$Internal$Model$CenterY);
var $elm$html$Html$Attributes$title = $elm$html$Html$Attributes$stringProperty('title');
var $author$project$Main$emoji = function (e) {
return A2(
$mdgriffith$elm_ui$Element$Input$button,
_List_fromArray(
[
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$title(e.name)),
$mdgriffith$elm_ui$Element$centerX,
$mdgriffith$elm_ui$Element$centerY
]),
{
label: $mdgriffith$elm_ui$Element$text(e.unicode),
onPress: $elm$core$Maybe$Just(
$author$project$Main$Copy(e.unicode))
});
};
var $mdgriffith$elm_ui$Internal$Model$Empty = {$: 'Empty'}; var $mdgriffith$elm_ui$Internal$Model$Empty = {$: 'Empty'};
var $mdgriffith$elm_ui$Element$none = $mdgriffith$elm_ui$Internal$Model$Empty; var $mdgriffith$elm_ui$Element$none = $mdgriffith$elm_ui$Internal$Model$Empty;
var $author$project$Main$maybeEmoji = function (e) { var $author$project$Main$maybeEmoji = function (e) {