Skip to content

Commit

Permalink
fix: positionne la valeur de websocketEndpoint statiquement (Ecriture…
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie authored Nov 7, 2024
1 parent b4bf846 commit 779e50a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
11 changes: 1 addition & 10 deletions front/src/createReduxStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const initialState = {
processEndpoint: __PROCESS_ENDPOINT__,
pandocExportEndpoint: __PANDOC_EXPORT_ENDPOINT__,
humanIdRegisterEndpoint: __HUMANID_REGISTER_ENDPOINT__,
websocketEndpoint: toWebsocketEndpoint(__BACKEND_ENDPOINT__)
},
articleStructure: [],
articleVersions: [],
Expand Down Expand Up @@ -88,7 +89,6 @@ export const initialState = {

function createRootReducer (state) {
return createReducer(state, {
APPLICATION_CONFIG: setApplicationConfig,
PROFILE: setProfile,
CLEAR_ZOTERO_TOKEN: clearZoteroToken,
LOGIN: loginUser,
Expand Down Expand Up @@ -260,15 +260,6 @@ function persistStateIntoLocalStorage ({ getState }) {
}
}

function setApplicationConfig (state, action) {
const applicationConfig = {
...action.applicationConfig,
websocketEndpoint: toWebsocketEndpoint(action.applicationConfig.backendEndpoint)
}

return { ...state, applicationConfig }
}

function setProfile (state, action) {
const { user } = action
if (!user) {
Expand Down
5 changes: 0 additions & 5 deletions front/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ import Register from './components/Register'
import PrivateRoute from './components/PrivateRoute'
import NotFound from './components/404'
import Error from './components/Error'
import Button from './components/Button'
import Field from './components/Field'
import { Check, Copy, Search } from 'react-feather'
import buttonStyles from './components/button.module.scss'
import Select from './components/Select'
import Story from './stories/Story.jsx'

// lazy loaded routes
Expand Down

0 comments on commit 779e50a

Please sign in to comment.