Skip to content

Commit

Permalink
Moved slice for stations/channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Zusoy committed Feb 26, 2024
1 parent 8ce6727 commit 8767161
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions apps/client/src/AuthenticatedApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import Messages from 'features/Messages/List'
import Messenger from 'features/Messages/Messenger'
import Logout from 'features/Me/Logout'
import JoinOrCreateStation from 'features/Stations/JoinOrCreateDialog'
import { selectCurrentStationId } from 'features/Stations/List/slice'
import { selectCurrentChannel } from 'features/Channels/List/slice'
import { selectCurrentStationId } from 'features/Stations/slice'
import { selectCurrentChannel } from 'features/Channels/slice'
import { useSelector } from 'react-redux'

const AuthenticatedApp: React.FC = () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/app/reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { combineReducers } from 'redux'
import authentication from 'features/Me/Authentication/slice'
import me from 'features/Me/slice'
import logout from 'features/Me/Logout/slice'
import stations from 'features/Stations/List/slice'
import channels from 'features/Channels/List/slice'
import stations from 'features/Stations/slice'
import channels from 'features/Channels/slice'
import messages from 'features/Messages/List/slice'
import messenger from 'features/Messages/Messenger/slice'

Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/features/Channels/List/effects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, test, expect } from 'vitest'
import { call, put } from 'redux-saga/effects'
import { get, ApiErrorResponse } from 'services/api'
import { fetchAllEffect } from 'features/Channels/List/effects'
import { received, error, fetchAll } from 'features/Channels/List/slice'
import { received, error, fetchAll } from 'features/Channels/slice'
import { stationMock, channelMock } from 'test-utils'

describe('Effects/Channels/List', () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/features/Channels/List/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type PayloadAction } from '@reduxjs/toolkit'
import { type Station } from 'models/station'
import { type Channel } from 'models/channel'
import { call, put, takeLatest } from 'redux-saga/effects'
import { fetchAll, received, error } from 'features/Channels/List/slice'
import { fetchAll, received, error } from 'features/Channels/slice'
import { get } from 'services/api'

export function* fetchAllEffect(action: PayloadAction<Station['id']>): Generator {
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/features/Channels/List/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
selectItems,
selectCurrentChannel,
selectIsFetching
} from 'features/Channels/List/slice'
} from 'features/Channels/slice'
import { useDispatch, useSelector } from 'react-redux'
import { Card, List as MatList, ListItem } from '@material-tailwind/react'
import Fallback from 'features/Channels/List/Fallback'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import slice, {
changeChannel,
ChannelsStatus,
type State
} from 'features/Channels/List/slice'
} from 'features/Channels/slice'
import { channelMock } from 'test-utils'

describe('Features/Channels/List', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlice, type PayloadAction } from '@reduxjs/toolkit'
import { changeStation } from 'features/Stations/List/slice'
import { changeStation } from 'features/Stations/slice'
import { type Nullable } from 'utils'
import { type Selector } from 'app/store'
import { type Station } from 'models/station'
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/features/Messages/List/slice.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlice, type PayloadAction } from '@reduxjs/toolkit'
import { changeChannel } from 'features/Channels/List/slice'
import { changeChannel } from 'features/Channels/slice'
import { type Message } from 'models/message'
import { type Selector } from 'app/store'
import { type Channel } from 'models/channel'
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/features/Stations/List/effects.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetchAll, received, error } from 'features/Stations/List/slice'
import { fetchAll, received, error } from 'features/Stations/slice'
import { call, put, takeLatest } from 'redux-saga/effects'
import { get } from 'services/api'
import { type Station } from 'models/station'
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/features/Stations/List/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
selectStations,
changeStation,
selectCurrentStationId
} from 'features/Stations/List/slice'
} from 'features/Stations/slice'
import StationBadge from 'widgets/Station/StationBadge'
import Fallback from 'features/Stations/List/Fallback'
import AddStation from 'widgets/Station/NewStationBadge'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import slice, {
changeStation,
initialState,
StationsStatus
} from 'features/Stations/List/slice'
} from 'features/Stations/slice'
import { stationMock } from 'test-utils'

describe('Features/Stations/List', () => {
Expand Down
File renamed without changes.

0 comments on commit 8767161

Please sign in to comment.