Skip to content

Commit

Permalink
Fix navigation after add programming (#455)
Browse files Browse the repository at this point in the history
* fix navigation after adding programming

* fix typo
  • Loading branch information
markdavella authored May 28, 2024
1 parent 026604a commit 6e0a023
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export function Root({ children }: { children?: React.ReactNode }) {
{displaySelectedProgramming && (
<SelectedProgrammingList
onAddSelectedMedia={addMediaToCurrentChannel}
onAddMediaSuccess={() => navigate('..', { relative: 'path' })}
onAddMediaSuccess={() => navigate(-1)}
/>
)}
</Box>
Expand Down
6 changes: 3 additions & 3 deletions web/src/preloaders/fillerListLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import {
FillerListProgramming,
} from '@tunarr/types';
import { LoaderFunctionArgs } from 'react-router-dom';
import { getApiClient } from '../components/TunarrApiContext.tsx';
import { createPreloader } from '../helpers/preloaderUtil.ts';
import {
fillerListProgramsQuery,
fillerListQuery,
fillerListsQuery,
} from '../hooks/useFillerLists.ts';
import { setCurrentFillerList } from '../store/channelEditor/actions.ts';
import { Preloader } from '../types/index.ts';
import { createPreloader } from '../helpers/preloaderUtil.ts';
import { getApiClient } from '../components/TunarrApiContext.tsx';

export const fillerListsLoader = createPreloader((apiClient) =>
fillerListsQuery(apiClient),
Expand All @@ -29,7 +29,7 @@ const fillerListLoader = (isNew: boolean) => {
return () => () => {
const filler = {
id: 'unsaved',
name: 'New Filler Listt',
name: 'New Filler List',
contentCount: 0,
};
setCurrentFillerList(filler, []);
Expand Down

0 comments on commit 6e0a023

Please sign in to comment.