mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: better ratings toolbar
This commit is contained in:
1 parent
c83cec8ed7
commit
81c2ca80bc
4 files changed
+131
-44
No files matched your search
@@ -2,26 +2,18 @@ import { create } from 'zustand';
|
||||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { Region } from '../constants/regions';
|
||||
|
||||
export type RatingsType = 'neighbors' | 'league';
|
||||
|
||||
interface Ratings {
|
||||
type: RatingsType;
|
||||
/**
|
||||
* When null, the current season is used unless there ain't one in which case
|
||||
* we do whatever lol
|
||||
*/
|
||||
season: number | null;
|
||||
region: Region;
|
||||
league: number;
|
||||
}
|
||||
|
||||
export const useRatings = create<Ratings>()(
|
||||
devtools(
|
||||
persist(
|
||||
(set) => ({
|
||||
type: 'league',
|
||||
season: null,
|
||||
league: 0,
|
||||
region: 'com',
|
||||
}),
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user