diff --git a/src/renderer/app.tsx b/src/renderer/app.tsx index 11b2489d1..17dd47492 100644 --- a/src/renderer/app.tsx +++ b/src/renderer/app.tsx @@ -1038,6 +1038,7 @@ export class App extends React.Component { rollRandomGames: this.rollRandomGames, updateView: this.updateView, gamesTotal: view && view.total, + allPlaylists: this.props.main.playlists, playlists: playlists, suggestions: this.props.main.suggestions, appPaths: this.props.main.appPaths, diff --git a/src/renderer/components/pages/HomePage.tsx b/src/renderer/components/pages/HomePage.tsx index a76c6521a..a9e89cc65 100644 --- a/src/renderer/components/pages/HomePage.tsx +++ b/src/renderer/components/pages/HomePage.tsx @@ -9,7 +9,6 @@ import { updatePreferencesData } from '@shared/preferences/util'; import { getUpgradeString } from '@shared/upgrade/util'; import { formatString } from '@shared/utils/StringFormatter'; import { AppUpdater, UpdateInfo } from 'electron-updater'; -import * as path from 'path'; import * as React from 'react'; import ReactMarkdown from 'react-markdown'; import { Link } from 'react-router-dom'; @@ -97,12 +96,8 @@ export function HomePage(props: HomePageProps) { props.onLaunchGame(gameId); }, [props.onLaunchGame]); - const onHelpClick = React.useCallback(() => { - remote.shell.openPath(path.join(window.Shared.config.fullFlashpointPath, 'Manual.pdf')); - }, [window.Shared.config.fullFlashpointPath]); - const onHallOfFameClick = React.useCallback(() => { - const playlist = props.playlists.find(p => p.title === 'Flashpoint Hall of Fame'); + const playlist = props.playlists.find(p => p.title.toLowerCase().includes('hall of fame')); if (playlist) { props.onSelectPlaylist(ARCADE, playlist.id); props.clearSearch(); @@ -248,7 +243,7 @@ export function HomePage(props: HomePageProps) { {formatString(strings.configInfo, {strings.config})} - {formatString(strings.helpInfo, {strings.help})} + {formatString(strings.helpInfo, {strings.help})} ); @@ -261,7 +256,7 @@ export function HomePage(props: HomePageProps) { {render} ); - }, [strings, onHallOfFameClick, onAllGamesClick, onAllAnimationsClick, onHelpClick, props.preferencesData.minimizedHomePageBoxes, toggleMinimizeBox]); + }, [strings, onHallOfFameClick, onAllGamesClick, onAllAnimationsClick, props.preferencesData.minimizedHomePageBoxes, toggleMinimizeBox]); const renderedExtras = React.useMemo(() => { const render = ( diff --git a/src/renderer/router.tsx b/src/renderer/router.tsx index 1189574ed..9a7637330 100644 --- a/src/renderer/router.tsx +++ b/src/renderer/router.tsx @@ -32,6 +32,7 @@ export type AppRouterProps = { randomGames: ViewGame[]; rollRandomGames: () => void; gamesTotal?: number; + allPlaylists: Playlist[]; playlists: Playlist[]; suggestions: Partial; appPaths: Record; @@ -84,7 +85,7 @@ export class AppRouter extends React.Component { render() { const homeProps: ConnectedHomePageProps = { platforms: this.props.platforms, - playlists: this.props.playlists, + playlists: this.props.allPlaylists, upgrades: this.props.upgrades, onGameContextMenu: this.props.onGameContextMenu, onSelectPlaylist: this.props.onSelectPlaylist,