Skip to content

Commit

Permalink
fix: update flow for update email feature
Browse files Browse the repository at this point in the history
  • Loading branch information
darkoatanasovski committed Dec 7, 2022
1 parent af7b72d commit 6bd308d
Show file tree
Hide file tree
Showing 4 changed files with 755 additions and 216 deletions.
6 changes: 3 additions & 3 deletions src/pages/User/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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, canUpdateEmail } from '#src/stores/AccountController';
import { logout } from '#src/stores/AccountController';
import { clear as clearFavorites } from '#src/stores/FavoritesController';

const User = (): JSX.Element => {
Expand All @@ -41,7 +41,7 @@ const User = (): JSX.Element => {
const [clearFavoritesOpen, setClearFavoritesOpen] = useState(false);
const [showAllTransactions, setShowAllTransactions] = useState(false);
const isLargeScreen = breakpoint > Breakpoint.md;
const { user: customer, subscription, transactions, activePayment, loading } = useAccountStore();
const { user: customer, subscription, transactions, activePayment, loading, canUpdateEmail } = useAccountStore();

const updateBlurImage = useBlurImageUpdater();

Expand Down Expand Up @@ -98,7 +98,7 @@ const User = (): JSX.Element => {
<Routes>
<Route
path="my-account"
element={<AccountComponent panelClassName={styles.panel} panelHeaderClassName={styles.panelHeader} canUpdateEmail={canUpdateEmail()} />}
element={<AccountComponent panelClassName={styles.panel} panelHeaderClassName={styles.panelHeader} canUpdateEmail={canUpdateEmail} />}
/>
{favoritesList && (
<Route
Expand Down
Loading

0 comments on commit 6bd308d

Please sign in to comment.