Skip to content

Commit

Permalink
fix: handle firstname and surname metadata parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
darkoatanasovski committed Dec 7, 2022
1 parent e740cdc commit 18c3c64
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 756 deletions.
7 changes: 3 additions & 4 deletions src/pages/User/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ import AccountComponent from '#components/Account/Account';
import Button from '#components/Button/Button';
import Favorites from '#components/Favorites/Favorites';
import type { PlaylistItem } from '#types/playlist';
import { logout } from '#src/stores/AccountController';
import { logout, canUpdateEmail } from '#src/stores/AccountController';
import { clear as clearFavorites } from '#src/stores/FavoritesController';

const User = (): JSX.Element => {
const { accessModel, favoritesList, shelfTitles, integration } = useConfigStore(
const { accessModel, favoritesList, shelfTitles } = useConfigStore(
(s) => ({
accessModel: s.accessModel,
favoritesList: s.config.features?.favoritesList,
shelfTitles: s.config.styling.shelfTitles,
integration: s.config.integrations,
}),
shallow,
);
Expand Down Expand Up @@ -99,7 +98,7 @@ const User = (): JSX.Element => {
<Routes>
<Route
path="my-account"
element={<AccountComponent panelClassName={styles.panel} panelHeaderClassName={styles.panelHeader} canUpdateEmail={!integration?.inplayer} />}
element={<AccountComponent panelClassName={styles.panel} panelHeaderClassName={styles.panelHeader} canUpdateEmail={canUpdateEmail()} />}
/>
{favoritesList && (
<Route
Expand Down
Loading

0 comments on commit 18c3c64

Please sign in to comment.