Skip to content

Commit

Permalink
Move ThemeSynchronizer to shared pkgs (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw authored Jan 22, 2025
1 parent 0ab520d commit 0f0bff2
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 87 deletions.
9 changes: 9 additions & 0 deletions .changeset/gorgeous-berries-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"products-feed": patch
"segment": patch
"app-avatax": patch
"cms-v2": patch
"smtp": patch
---

Move `ThemeSynchronizer` utility to shared packages.
3 changes: 1 addition & 2 deletions apps/avatax/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import "@saleor/macaw-ui/style";

import { AppBridge, AppBridgeProvider } from "@saleor/app-sdk/app-bridge";
import { RoutePropagator } from "@saleor/app-sdk/app-bridge/next";
import { NoSSRWrapper } from "@saleor/apps-shared";
import { NoSSRWrapper, ThemeSynchronizer } from "@saleor/apps-shared";
import { ThemeProvider } from "@saleor/macaw-ui";
import { AppProps } from "next/app";

import { ThemeSynchronizer } from "../lib/theme-synchronizer";
import { trpcClient } from "../modules/trpc/trpc-client";
import { AppLayout } from "../modules/ui/app-layout";
import { GraphQLProvider } from "../providers/GraphQLProvider";
Expand Down
24 changes: 0 additions & 24 deletions apps/cms-v2/src/modules/theme/theme-synchronizer.tsx

This file was deleted.

6 changes: 2 additions & 4 deletions apps/cms-v2/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import "@saleor/macaw-ui/style";
import "@/modules/theme/styles.css";
import "@saleor/macaw-ui/style";

import { AppBridge, AppBridgeProvider } from "@saleor/app-sdk/app-bridge";
import { RoutePropagator } from "@saleor/app-sdk/app-bridge/next";
import { NoSSRWrapper } from "@saleor/apps-shared";
import { NoSSRWrapper, ThemeSynchronizer } from "@saleor/apps-shared";
import { Box, ThemeProvider } from "@saleor/macaw-ui";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { AppProps } from "next/app";
import React, { useEffect } from "react";

import { GraphQLProvider } from "@/modules/graphql/GraphQLProvider";
import { ThemeSynchronizer } from "@/modules/theme/theme-synchronizer";
import { trpcClient } from "@/modules/trpc/trpc-client";

/**
Expand Down
25 changes: 0 additions & 25 deletions apps/products-feed/src/lib/theme-synchronizer.tsx

This file was deleted.

4 changes: 1 addition & 3 deletions apps/products-feed/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import "@saleor/macaw-ui/style";

import { AppBridge, AppBridgeProvider } from "@saleor/app-sdk/app-bridge";
import { RoutePropagator } from "@saleor/app-sdk/app-bridge/next";
import { NoSSRWrapper } from "@saleor/apps-shared";
import { NoSSRWrapper, ThemeSynchronizer } from "@saleor/apps-shared";
import { Box, ThemeProvider } from "@saleor/macaw-ui";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { AppProps } from "next/app";
import React from "react";

import { ThemeSynchronizer } from "../lib/theme-synchronizer";
import { trpcClient } from "../modules/trpc/trpc-client";

/**
Expand Down
3 changes: 1 addition & 2 deletions apps/segment/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import "@saleor/macaw-ui/style";

import { AppBridge, AppBridgeProvider } from "@saleor/app-sdk/app-bridge";
import { RoutePropagator } from "@saleor/app-sdk/app-bridge/next";
import { NoSSRWrapper } from "@saleor/apps-shared";
import { NoSSRWrapper, ThemeSynchronizer } from "@saleor/apps-shared";
import { Box, ThemeProvider } from "@saleor/macaw-ui";
import { AppProps } from "next/app";

import { ThemeSynchronizer } from "@/lib/theme-synchronizer";
import { trpcClient } from "@/modules/trpc/trpc-client";
import { GraphQLProvider } from "@/providers/GraphQLProvider";

Expand Down
24 changes: 0 additions & 24 deletions apps/smtp/src/lib/theme-synchronizer.tsx

This file was deleted.

4 changes: 1 addition & 3 deletions apps/smtp/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import "../styles/globals.css";

import { AppBridge, AppBridgeProvider } from "@saleor/app-sdk/app-bridge";
import { RoutePropagator } from "@saleor/app-sdk/app-bridge/next";
import { NoSSRWrapper } from "@saleor/apps-shared";
import { NoSSRWrapper, ThemeSynchronizer } from "@saleor/apps-shared";
import { ThemeProvider } from "@saleor/macaw-ui";
import { AppProps } from "next/app";
import React from "react";

import { ThemeSynchronizer } from "../lib/theme-synchronizer";
import { trpcClient } from "../modules/trpc/trpc-client";

/**
Expand Down

0 comments on commit 0f0bff2

Please sign in to comment.