Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* reducer */(function (action, state) {
if (action) {
return /* Update */Block.__(0, [/* record */[/* isDropdownOpen */!state[/* isDropdownOpen */0]]]);
} else {
console.log("Clicked LogOut!!");
return /* SideEffects */Block.__(1, [(function (_state) {
auth.logout("spotify").then((function (param) {
return auth.isLoggedIn("spotify");
})).then((function (loginStatus) {
console.log(loginStatus);
Curry._1(setLogInStatus, loginStatus);
return Promise.resolve(/* () */0);
})).catch((function (err) {
return Promise.resolve((console.log(err), /* () */0));
}));
return /* () */0;
})]);
}
}),
/* jsElementWrapped */component[/* jsElementWrapped */13]
]
]
]
]);
var title = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.fontWeight(/* Bold */737455525),
/* [] */0
]);
var cardListItem = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.height(/* Pt */Block.__(0, [170.0])),
/* :: */[
Style$BsReactNative.flexDirection(/* Row */0),
/* :: */[
Style$BsReactNative.padding(/* Pt */Block.__(0, [16.0])),
/* [] */0
]
]
]);
var thumbnail = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.height(/* Pt */Block.__(0, [100.0])),
/* :: */[
Style$BsReactNative.width(/* Pt */Block.__(0, [72.0])),
/* [] */0
]
]);
var stats = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.width(/* Pt */Block.__(0, [45.0])),
/* :: */[
}
case 3 :
var match$4 = statList[0];
switch (match$4.tag | 0) {
case 1 :
var match$5 = statList[1];
switch (match$5.tag | 0) {
case 0 :
case 1 :
return Pervasives.failwith("Invalid Battle Card stat list.");
case 2 :
var match$6 = statList[2];
switch (match$6.tag | 0) {
case 0 :
return /* StrengthIntelligenceSpecial */Block.__(6, [match$4[0]]);
case 1 :
case 2 :
return Pervasives.failwith("Invalid Battle Card stat list.");
}
}
case 0 :
case 2 :
return Pervasives.failwith("Invalid Battle Card stat list.");
}
}
}
}
}
}
function decoder(json) {
return Json_decode.map(fromRecord, (function (json) {
return /* record */[
/* type_ */Json_decode.field("type", Json_decode.string, json),
/* rank */Json_decode.field("rank", Json_decode.$$int, json)
];
}), json);
}
var container = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.flexDirection(/* Row */0),
/* :: */[
Style$BsReactNative.marginTop(/* Pt */Block.__(0, [8.0])),
/* :: */[
Style$BsReactNative.justifyContent(/* FlexEnd */1),
/* :: */[
Style$BsReactNative.alignItems(/* Center */2),
/* :: */[
Style$BsReactNative.width(/* Pt */Block.__(0, [45.0])),
/* [] */0
]
]
]
]
]);
var rank = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.marginLeft(/* Pt */Block.__(0, [4.0])),
/* :: */[
/* :: */[
Style$BsReactNative.justifyContent(/* FlexEnd */1),
/* :: */[
Style$BsReactNative.alignItems(/* Center */2),
/* :: */[
Style$BsReactNative.width(/* Pt */Block.__(0, [68.0])),
/* [] */0
]
]
]
]);
var doubleIcon = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.position(/* Relative */1),
/* :: */[
Style$BsReactNative.width(/* Pt */Block.__(0, [38.5])),
/* :: */[
Style$BsReactNative.height(/* Pt */Block.__(0, [30.0])),
/* [] */0
]
]
]);
var firstDouble = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.position(/* Absolute */0),
/* :: */[
Style$BsReactNative.top(/* Pt */Block.__(0, [5.0])),
/* :: */[
Style$BsReactNative.left(/* Pt */Block.__(0, [0.0])),
/* :: */[
Style$BsReactNative.zIndex(2),
/* :: */[
function compileTest(setup, test) {
var param = _check(test[/* language */1], test[/* code */2]);
if (param.tag) {
var e = param[0];
return /* Error */Block.__(2, [
e[/* message */0],
/* :: */[
toMark(e),
/* [] */0
]
]);
} else {
var param$1 = Rebase.Result[/* flatMap */6](BsBox.compile, Rebase.Result[/* map */0](Rebase.Fn[/* id */0], Rebase.Result[/* map */0](Refmt.printML, Refmt.parseRE(_assemble(setup, param[0])))));
if (param$1.tag) {
return /* Error */Block.__(2, [
param$1[0][1][/* message */0],
/* [] */0
]);
} else {
var match = param$1[0];
var warnings = match[/* warnings */1];
var code = match[/* code */0];
if (warnings === "") {
return /* Ok */Block.__(0, [code]);
} else {
return /* Warning */Block.__(1, [
code,
warnings
]);
}
}
/* reducer */(function (action, state) {
return /* Update */Block.__(0, [/* record */[/* isDropdownOpen */!state[/* isDropdownOpen */0]]]);
}),
/* jsElementWrapped */component[/* jsElementWrapped */13]
];
var component = ReasonReact.reducerComponent("GridOfCards");
var container = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.flex(1),
/* :: */[
Style$BsReactNative.alignItems(/* Stretch */3),
/* [] */0
]
]);
var small = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.height(/* Pt */Block.__(0, [100])),
/* :: */[
Style$BsReactNative.width(/* Pt */Block.__(0, [72])),
/* [] */0
]
]);
var Styles = /* module */[
/* container */container,
/* small */small
];
function getUri(card) {
var match = card.image;
if (match) {
return match[0].small;
} else {
return "";
}
function _wrap(f, x) {
try {
return /* Ok */Block.__(0, [Curry._1(f, x)]);
}
catch (raw_exn){
var exn = Js_exn.internalToOCamlException(raw_exn);
if (exn[0] === Js_exn.$$Error) {
return /* Error */Block.__(1, [exn[1]]);
} else {
throw exn;
}
}
}
Style$BsReactNative.position(/* Relative */1),
/* :: */[
Style$BsReactNative.width(/* Pt */Block.__(0, [38.5])),
/* :: */[
Style$BsReactNative.height(/* Pt */Block.__(0, [30.0])),
/* [] */0
]
]
]);
var firstDouble = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.position(/* Absolute */0),
/* :: */[
Style$BsReactNative.top(/* Pt */Block.__(0, [5.0])),
/* :: */[
Style$BsReactNative.left(/* Pt */Block.__(0, [0.0])),
/* :: */[
Style$BsReactNative.zIndex(2),
/* :: */[
Style$BsReactNative.borderRadius(12.0),
/* :: */[
Style$BsReactNative.backgroundColor(Colors$Mxdbmobile.Css[/* white */1]),
/* [] */0
]
]
]
]
]
]);
var secondDouble = Style$BsReactNative.style(/* :: */[
Style$BsReactNative.position(/* Absolute */0),