Skip to content

Commit

Permalink
update loadPath
Browse files Browse the repository at this point in the history
  • Loading branch information
stasguma committed Apr 25, 2024
1 parent 1a350e9 commit 375f8ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/entities/Session/model/slice/sessionSlice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ describe('sessionSlice', () => {
const state = sessionReducer(undefined, { type: 'unknown' });
expect(state).toEqual({
loading: 'idle',
id: undefined,
username: undefined,
token: undefined,
isAuthenticated: false,
data: undefined,
error: undefined,
sessionInited: false,
});
Expand All @@ -22,17 +19,20 @@ describe('sessionSlice', () => {
const prevState: DeepPartial<SessionSchema> = {};

const sessionData = {
id: '1',
id: 1,
username: 'Tomas',
token: 'Bearer asdasdasda',
isAuthenticated: true,
sessionInited: true,
role: 'admin',
};

LocalStorage.setItem(LOCAL_STORAGE_SESSION_KEY, sessionData);

const state = sessionReducer(prevState as SessionSchema, initSession());

expect(state).toEqual(sessionData);
expect(state).toEqual({
data: sessionData,
sessionInited: true,
});
});
});
2 changes: 1 addition & 1 deletion src/shared/config/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ i18n
escapeValue: false, // react already safes from xss
},
backend: {
loadPath: __IS_DEV__ ? '/locales/{{lng}}/{{ns}}.json' : '/public/locales/{{lng}}/{{ns}}.json',
// loadPath: __IS_DEV__ ? '/locales/{{lng}}/{{ns}}.json' : '/public/locales/{{lng}}/{{ns}}.json',
},
});

Expand Down
2 changes: 1 addition & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { buildWebpackConfig } from './config/build/buildWebpackConfig';
export default (env: IBuildEnvironment): webpack.Configuration => {
const mode: TBuildMode = env.development ? 'development' : 'production';
const isDev = mode === 'development';
const publicPath = env.assetPath ?? '/';
const publicPath = env.assetPath ?? 'auto';
const PORT = env.port ?? 8080;

const paths: IBuildPaths = {
Expand Down

0 comments on commit 375f8ae

Please sign in to comment.