mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 07:32:02 +00:00
refactor(Ratings): rename RatingStatus to Rating
This commit is contained in:
parent
cbe3a5d35e
commit
80fc8c755f
2 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ import { useServices } from 'stremio/services';
|
||||||
const useRating = (ratingInfo?: Loadable<RatingInfo>) => {
|
const useRating = (ratingInfo?: Loadable<RatingInfo>) => {
|
||||||
const { core } = useServices();
|
const { core } = useServices();
|
||||||
|
|
||||||
const setRating = useCallback((status: RatingStatus) => {
|
const setRating = useCallback((status: Rating) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'MetaDetails',
|
action: 'MetaDetails',
|
||||||
args: {
|
args: {
|
||||||
|
|
|
||||||
4
src/types/types.d.ts
vendored
4
src/types/types.d.ts
vendored
|
|
@ -69,9 +69,9 @@ type AudioTrack = {
|
||||||
origin: string,
|
origin: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
type RatingStatus = 'liked' | 'loved' | null;
|
type Rating = 'liked' | 'loved' | null;
|
||||||
|
|
||||||
type RatingInfo = {
|
type RatingInfo = {
|
||||||
metaId: string,
|
metaId: string,
|
||||||
status: RatingStatus,
|
status: Rating,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue