Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
some error handeling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaBhattacharjee committed May 29, 2023
1 parent 40e9f12 commit a7f3b24
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 151 deletions.
42 changes: 41 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"react-lazy-load-image-component": "^1.5.6",
"react-router-dom": "^6.8.0",
"react-spinners": "^0.13.8",
"ripple-effect-reactjs": "^1.0.6"
"ripple-effect-reactjs": "^1.0.6",
"swiper": "^9.3.2"
},
"devDependencies": {
"@types/react": "^18.0.26",
Expand Down
2 changes: 0 additions & 2 deletions src/AnimateRoutes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
ViewAllAlbums,
Artist,
TopArtist,
CustomizedAccordions,
} from "./Page";
import {
HindiPlaylist,
Expand Down Expand Up @@ -38,7 +37,6 @@ const AnimateRoutes = () => {
<Route path="/topplaylists/Bhojpuri" element={<BhojpuriPlaylist />} />
<Route path="/topplaylists/English" element={<EnglishPlaylists />} />
<Route path="/topartist" element={<TopArtist />} />
<Route path="/about" element={<CustomizedAccordions />} />
</Routes>
</AnimatePresence>
);
Expand Down
142 changes: 0 additions & 142 deletions src/Page/HelpSupport.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/Page/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ViewAllAlbums from "./ViewAllAlbums";
import Artist from "./Artist";
import RecentSongs from "./RecentSongs";
import TopArtist from "./TopArtist";
import CustomizedAccordions from "./HelpSupport";
export {
Home,
SingleAlbum,
Expand All @@ -18,5 +17,4 @@ export {
Artist,
RecentSongs,
TopArtist,
CustomizedAccordions,
};
9 changes: 9 additions & 0 deletions src/Reducers/MusicReducer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ const Music_reducer = (state, action) => {
single_album_loading: false,
};
}

if (action.type === GET_SINGLE_ALBUM_ERROR) {
// Handle the error case here
return {
...state,
single_album_loading: false,
};
}

if (action.type === GET_SINGLE_PLAYLIST_BEGIN) {
return { ...state, single_album_loading: true };
Expand Down Expand Up @@ -114,6 +122,7 @@ const Music_reducer = (state, action) => {
if (action.type === ALERT_SHOW) {
return { ...state, alert_show: false };
}

throw new Error(`No Matching "${action.type}" -action type`);
};

Expand Down
4 changes: 1 addition & 3 deletions src/components/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ const SearchBar = () => {
return (
<section className="flex items-center searchBarContainer gap-4 w-1/2 max-md:w-full">
<div className="w-fit hidden max-md:flex" onClick={HandleSideNav}>
<IconButton>
<MenuSharpIcon className="text-slate-200" />
</IconButton>
<MenuSharpIcon className="text-slate-200" style={{fontSize:35}}/>
</div>
<div
className="flex items-center w-full focus-within:border-darkTextColor group transition-all duration-400 ease-linear rounded-sm pl-5 pr-1 h-12 bg-[#2d1b69] border-[#ffd4d46e]"
Expand Down

0 comments on commit a7f3b24

Please sign in to comment.