Skip to content

Commit

Permalink
chore: remove export and rename reducers in common
Browse files Browse the repository at this point in the history
  • Loading branch information
sboh1214 committed May 16, 2024
1 parent 8220509 commit 80a6d31
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/reducers/common/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const initialState: MediaState = {
isPortrait: false,
};

export const reducer = (state = initialState, action: MediaAction): MediaState => {
const media = (state = initialState, action: MediaAction): MediaState => {
switch (action.type) {
case SET_IS_PORTRAIT:
return { ...state, isPortrait: action.isPortrait };
Expand All @@ -17,4 +17,4 @@ export const reducer = (state = initialState, action: MediaAction): MediaState =
}
};

export default reducer;
export default media;
4 changes: 2 additions & 2 deletions src/reducers/common/semester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const initialState: SemesterState = {
semesters: null,
};

export const reducer = (state = initialState, action: SemesterAction): SemesterState => {
const semester = (state = initialState, action: SemesterAction): SemesterState => {
switch (action.type) {
case SET_SEMESTERS:
return { ...state, semesters: action.semesters };
Expand All @@ -18,4 +18,4 @@ export const reducer = (state = initialState, action: SemesterAction): SemesterS
}
};

export default reducer;
export default semester;
4 changes: 2 additions & 2 deletions src/reducers/common/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const initialState: TrackState = {
tracks: null,
};

export const reducer = (state = initialState, action: TrackAction): TrackState => {
const track = (state = initialState, action: TrackAction): TrackState => {
switch (action.type) {
case SET_TRACKS:
return { ...state, tracks: action.tracks };
Expand All @@ -17,4 +17,4 @@ export const reducer = (state = initialState, action: TrackAction): TrackState =
}
};

export default reducer;
export default track;
4 changes: 2 additions & 2 deletions src/reducers/common/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const initialState: UserState = {
user: null,
};

export const reducer = (state = initialState, action: UserAction): UserState => {
const user = (state = initialState, action: UserAction): UserState => {
switch (action.type) {
case SET_USER:
return { ...state, user: action.user };
Expand All @@ -35,4 +35,4 @@ export const reducer = (state = initialState, action: UserAction): UserState =>
}
};

export default reducer;
export default user;

0 comments on commit 80a6d31

Please sign in to comment.