Skip to content

Commit

Permalink
changed 'mods' nav title to game name
Browse files Browse the repository at this point in the history
  • Loading branch information
IDCs committed Jul 24, 2024
1 parent 3f8286b commit d2d953f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/views/MainWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ import Settings from './Settings';
import WindowControls from './WindowControls';
import * as semver from 'semver';

import { profileById } from '../util/selectors';
import { getGame } from '../util/api';

import update from 'immutability-helper';
import * as _ from 'lodash';
import * as PropTypes from 'prop-types';
Expand Down Expand Up @@ -430,11 +433,14 @@ export class MainWindow extends React.Component<IProps, IMainWindowState> {

const pages = objects.map(obj => this.renderPage(obj));
pages.push(this.renderPage(this.settingsPage));

const state = this.props.api.getState();
const profile = profileById(state, this.props.activeProfileId);
const game = profile !== undefined ? getGame(profile.gameId) : undefined;
const gameName = game?.name || 'Mods';
const pageGroups = [
{ title: undefined, key: 'dashboard' },
{ title: 'General', key: 'global' },
{ title: 'Mods', key: 'per-game' },
{ title: gameName, key: 'per-game' },
{ title: 'About', key: 'support' },
];

Expand Down

0 comments on commit d2d953f

Please sign in to comment.