Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

reorganize supported countries' embed files

Pedro Ladeiraf800a3acf721
diff --git a/apps/web/app/(ee)/app.dub.co/embed/supported-countries/page.tsx b/apps/web/app/(ee)/app.dub.co/embed/supported-countries/page.tsx
index 8a15141ee9..1a4da7530e 100644
--- a/apps/web/app/(ee)/app.dub.co/embed/supported-countries/page.tsx
+++ b/apps/web/app/(ee)/app.dub.co/embed/supported-countries/page.tsx
@@ -1,20 +1,4 @@
-import {
- CONNECT_SUPPORTED_COUNTRIES,
- COUNTRIES,
- PAYPAL_SUPPORTED_COUNTRIES,
-} from "@dub/utils";
-import { CountryGrid } from "./country-grid";
-
-export function PayoutSupportedCountries() {
- const supportedCountries = [
- ...CONNECT_SUPPORTED_COUNTRIES,
- ...PAYPAL_SUPPORTED_COUNTRIES,
- ];
- const sortedCountries = supportedCountries.sort((a, b) =>
- COUNTRIES[a].localeCompare(COUNTRIES[b]),
- );
- return <CountryGrid countries={sortedCountries} />;
-}
+import PayoutSupportedCountries from "./payout-supported-countries";
export default function SupportedCountriesEmbed() {
return <PayoutSupportedCountries />;
diff --git a/apps/web/app/(ee)/app.dub.co/embed/supported-countries/country-grid.tsx b/apps/web/app/(ee)/app.dub.co/embed/supported-countries/payout-supported-countries.tsx
similarity index 79%
rename from apps/web/app/(ee)/app.dub.co/embed/supported-countries/country-grid.tsx
rename to apps/web/app/(ee)/app.dub.co/embed/supported-countries/payout-supported-countries.tsx
index 81ea10231f..3981d76176 100644
--- a/apps/web/app/(ee)/app.dub.co/embed/supported-countries/country-grid.tsx
+++ b/apps/web/app/(ee)/app.dub.co/embed/supported-countries/payout-supported-countries.tsx
@@ -1,10 +1,15 @@
"use client";
import { useMediaQuery } from "@dub/ui";
-import { cn, COUNTRIES } from "@dub/utils";
+import {
+ cn,
+ CONNECT_SUPPORTED_COUNTRIES,
+ COUNTRIES,
+ PAYPAL_SUPPORTED_COUNTRIES,
+} from "@dub/utils";
import { useState } from "react";
-export function CountryGrid({ countries }: { countries: string[] }) {
+function CountryGrid({ countries }: { countries: string[] }) {
const { isMobile } = useMediaQuery();
const showCount = isMobile ? 16 : 30;
const [expanded, setExpanded] = useState(false);
@@ -57,3 +62,14 @@ export function CountryGrid({ countries }: { countries: string[] }) {
</div>
);
}
+
+export default function PayoutSupportedCountries() {
+ const supportedCountries = [
+ ...CONNECT_SUPPORTED_COUNTRIES,
+ ...PAYPAL_SUPPORTED_COUNTRIES,
+ ];
+ const sortedCountries = supportedCountries.sort((a, b) =>
+ COUNTRIES[a].localeCompare(COUNTRIES[b]),
+ );
+ return <CountryGrid countries={sortedCountries} />;
+}