Skip to content

Commit

Permalink
Merge pull request #1957 from GW2Treasures/feature/refactor-gw2-data-…
Browse files Browse the repository at this point in the history
…subscriptions

Refactor gw2 data subscriptions
  • Loading branch information
darthmaim authored Jan 26, 2025
2 parents 62ca680 + d74d72d commit 726a97a
Show file tree
Hide file tree
Showing 19 changed files with 388 additions and 304 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/[language]/achievement/[id]/tier-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { Gw2Account } from '@/components/Gw2Api/types';
import { Skeleton } from '@/components/Skeleton/Skeleton';
import { ProgressCell } from '@/components/Achievement/ProgressCell';
import { AchievementPoints } from '@/components/Achievement/AchievementPoints';
import { useSubscription } from '@/components/Gw2Api/Gw2AccountSubscriptionProvider';
import { useSubscription } from '@/components/Gw2Api/use-gw2-subscription';
import { Scope } from '@gw2me/client';
import { Tip } from '@gw2treasures/ui/components/Tip/Tip';
import { Table } from '@gw2treasures/ui/components/Table/Table';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/[language]/currency/[id]/wallet-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import type { FC } from 'react';
import { CurrencyValue } from '@/components/Currency/CurrencyValue';
import { useSubscription } from '@/components/Gw2Api/Gw2AccountSubscriptionProvider';
import { useSubscription } from '@/components/Gw2Api/use-gw2-subscription';
import type { Gw2Account } from '@/components/Gw2Api/types';
import { Skeleton } from '@/components/Skeleton/Skeleton';
import { Scope } from '@gw2me/client';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/[language]/currency/account-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import type { FC } from 'react';
import { useGw2Accounts } from '@/components/Gw2Api/use-gw2-accounts';
import { Scope } from '@gw2me/client';
import { useSubscription } from '@/components/Gw2Api/Gw2AccountSubscriptionProvider';
import { useSubscription } from '@/components/Gw2Api/use-gw2-subscription';
import { Skeleton } from '@/components/Skeleton/Skeleton';
import { CurrencyValue } from '@/components/Currency/CurrencyValue';
import { Gw2AccountName } from '@/components/Gw2Api/Gw2AccountName';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/[language]/dashboard/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Headline } from '@gw2treasures/ui/components/Headline/Headline';
import { useInventoryItemTotal } from '@/components/Inventory/use-inventory';
import { Skeleton } from '@/components/Skeleton/Skeleton';
import { Scope } from '@gw2me/client';
import { useSubscription } from '@/components/Gw2Api/Gw2AccountSubscriptionProvider';
import { useSubscription } from '@/components/Gw2Api/use-gw2-subscription';
import { CurrencyValue } from '@/components/Currency/CurrencyValue';
import { ItemLink } from '@/components/Item/ItemLink';
import { CurrencyLink } from '@/components/Currency/CurrencyLink';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/[language]/homestead/homestead.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { createContext, useContext, useEffect, useState, type FC, type ReactNode } from 'react';
import { Scope } from '@gw2me/client';
import { useSubscription } from '@/components/Gw2Api/Gw2AccountSubscriptionProvider';
import { useSubscription } from '@/components/Gw2Api/use-gw2-subscription';
import { Skeleton } from '@/components/Skeleton/Skeleton';
import { ProgressCell } from '@/components/Achievement/ProgressCell';
import { Icon } from '@gw2treasures/ui';
Expand Down
7 changes: 2 additions & 5 deletions apps/web/app/[language]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ItemTableContext } from '@/components/ItemTable/ItemTableContext';
import { Gw2ApiProvider } from '@/components/Gw2Api/Gw2ApiProvider';
import { UserProvider } from '@/components/User/UserProvider';
import { DataTableContext } from '@gw2treasures/ui/components/Table/DataTableContext';
import { Gw2AccountSubscriptionProvider } from '@/components/Gw2Api/Gw2AccountSubscriptionProvider';
import type { ReactNode } from 'react';
import type { LayoutProps } from '@/lib/next';
import type { Viewport } from 'next';
Expand Down Expand Up @@ -48,10 +47,8 @@ export default async function RootLayout({ children, modal, params }: LayoutProp
<DataTableContext>
<UserProvider>
<Gw2ApiProvider>
<Gw2AccountSubscriptionProvider>
<Layout language={language}>{children}</Layout>
{modal}
</Gw2AccountSubscriptionProvider>
<Layout language={language}>{children}</Layout>
{modal}
</Gw2ApiProvider>
</UserProvider>
</DataTableContext>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import styles from './objectives.module.css';
import { ResetTimer } from '@/components/Reset/ResetTimer';
import { ProgressCell } from '@/components/Achievement/ProgressCell';
import { Scope } from '@gw2me/client';
import { useSubscription } from '@/components/Gw2Api/Gw2AccountSubscriptionProvider';
import { useSubscription } from '@/components/Gw2Api/use-gw2-subscription';
import { useGw2Accounts } from '@/components/Gw2Api/use-gw2-accounts';
import type { Gw2Account } from '@/components/Gw2Api/types';
import { Waypoint } from '@/components/Waypoint/Waypoint';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { FC } from 'react';
import { Skeleton } from '../Skeleton/Skeleton';
import { Icon } from '@gw2treasures/ui';
import { ProgressCell } from './ProgressCell';
import { useSubscription } from '../Gw2Api/Gw2AccountSubscriptionProvider';
import { useSubscription } from '../Gw2Api/use-gw2-subscription';
import { Scope } from '@gw2me/client';
import type { Achievement } from '@gw2treasures/database';
import { Tip } from '@gw2treasures/ui/components/Tip/Tip';
Expand Down
286 changes: 0 additions & 286 deletions apps/web/components/Gw2Api/Gw2AccountSubscriptionProvider.tsx

This file was deleted.

Loading

0 comments on commit 726a97a

Please sign in to comment.