rewrote the Anime.svelte to move out helper functions and clean up code

This commit is contained in:
2024-09-05 15:29:42 -04:00
parent aeec8f79b2
commit 77e361b5b2
20 changed files with 616 additions and 473 deletions

View File

@ -91,13 +91,13 @@ type MALAnime struct {
Id int `json:"id" ts_type:"id"`
Name string `json:"name" ts_type:"name"`
} `json:"genres" ts_type:"genres"`
CreatedAt string `json:"created_at" ts_type:"createdAt"`
UpdatedAt string `json:"updated_at" ts_type:"updatedAt"`
MediaType string `json:"media_type" ts_type:"mediaType"`
Status string `json:"status" ts_type:"status"`
MyListStatus MyListStatus `json:"my_list_status" ts_type:"myListStatus"`
NumEpisodes int `json:"num_episodes" ts_type:"numEpisodes"`
StartSeason struct {
CreatedAt string `json:"created_at" ts_type:"createdAt"`
UpdatedAt string `json:"updated_at" ts_type:"updatedAt"`
MediaType string `json:"media_type" ts_type:"mediaType"`
Status string `json:"status" ts_type:"status"`
MalListStatus MalListStatus `json:"my_list_status" ts_type:"MalListStatus"`
NumEpisodes int `json:"num_episodes" ts_type:"numEpisodes"`
StartSeason struct {
Year int `json:"year" ts_type:"year"`
Season string `json:"season" ts_type:"season"`
} `json:"start_season" ts_type:"startSeason"`
@ -138,7 +138,7 @@ type MALAnime struct {
}
}
type MyListStatus struct {
type MalListStatus struct {
Status string `json:"status" ts_type:"status"`
Score int `json:"score" ts_type:"score"`
NumEpisodesWatched int `json:"num_episodes_watched" ts_type:"numEpisodesWatched"`