Skip to content

Commit

Permalink
fix(core): adjust Pricing component localization in order to be used …
Browse files Browse the repository at this point in the history
…as client and server component (#898)
  • Loading branch information
BC-krasnoshapka committed May 13, 2024
1 parent bf0e326 commit 13038f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/components/pricing/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getFormatter, getLocale } from 'next-intl/server';
import { useFormatter } from 'next-intl';

import { graphql, ResultOf } from '~/client/graphql';

Expand Down Expand Up @@ -39,9 +39,8 @@ interface Props {
data: ResultOf<typeof PricingFragment>;
}

export const Pricing = async ({ data }: Props) => {
const locale = await getLocale();
const format = await getFormatter({ locale });
export const Pricing = ({ data }: Props) => {
const format = useFormatter();

const { prices } = data;

Expand Down

0 comments on commit 13038f1

Please sign in to comment.