mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-19 09:42:13 +00:00
refactor: correctly translate externalPlayer label
This commit is contained in:
parent
61793524f3
commit
2c83478ac0
1 changed files with 10 additions and 4 deletions
|
|
@ -196,11 +196,17 @@ const useProfileSettingsInputs = (profile) => {
|
|||
}
|
||||
}), [profile.settings]);
|
||||
const playInExternalPlayerSelect = React.useMemo(() => ({
|
||||
options: externalPlayerOptions.map((opt) => {
|
||||
opt.label = t(opt.label);
|
||||
return opt;
|
||||
}),
|
||||
options: externalPlayerOptions.map((opt) => ({
|
||||
value: opt.value,
|
||||
label: t(opt.label)
|
||||
})),
|
||||
selected: [`${profile.settings.playerType || 'internal'}`],
|
||||
renderLabelText: () => {
|
||||
const selectedLabel = externalPlayerOptions.find(
|
||||
(opt) => opt.value === profile.settings.playerType
|
||||
)?.label;
|
||||
return t(selectedLabel);
|
||||
},
|
||||
onSelect: (event) => {
|
||||
core.transport.dispatch({
|
||||
action: 'Ctx',
|
||||
|
|
|
|||
Loading…
Reference in a new issue