Skip to content

Commit

Permalink
fix: remove unwanted playlist in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane committed Oct 19, 2023
1 parent 574f6ed commit 6400c59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 3 additions & 7 deletions src/database/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@ export const importPlaylist = (playlist: CardPlaylist): void => {
};

export const getPlaylists = (): Playlist[] => {
const favoritePlaylist = getFavoritePlaylist();
return [
...db.queryAll("playlists", {
query: (row: Playlist) => row.title !== "Favorites",
}),
...favoritePlaylist.videos.filter((v) => v.type === "playlist"),
];
return db.queryAll("playlists", {
query: (row: Playlist) => row.title !== "Favorites",
});
};

export const getAllPlaylists = (): CardPlaylist[] => {
Expand Down
2 changes: 0 additions & 2 deletions src/providers/Playlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const SetPlaylistContext = createContext<
export const PlaylistProvider: FC<PropsWithChildren> = ({ children }) => {
const [playlists, setPlaylists] = useState(getPlaylists());

console.log(playlists);

const value = useMemo(
() => ({
playlists,
Expand Down

0 comments on commit 6400c59

Please sign in to comment.