Skip to content

Commit b3c84ef

Browse files
committed
Move ModManagerBanner to common file
1 parent 94be149 commit b3c84ef

File tree

4 files changed

+18
-36
lines changed

4 files changed

+18
-36
lines changed

apps/cyberstorm-remix/app/p/tabs/Versions/PackageVersionVersions.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
NewTable,
1010
NewTableLabels,
1111
Heading,
12-
NewAlert,
1312
SkeletonBox,
1413
NewLink,
1514
} from "@thunderstore/cyberstorm";
@@ -30,6 +29,7 @@ import {
3029
} from "cyberstorm/security/publicEnvVariables";
3130
import { Suspense } from "react";
3231
import { isSemver } from "cyberstorm/utils/typeChecks";
32+
import { ModManagerBanner } from "./common";
3333

3434
export async function loader({ params }: LoaderFunctionArgs) {
3535
if (params.communityId && params.namespaceId && params.packageId) {
@@ -181,17 +181,6 @@ const columns: NewTableLabels = [
181181
{ value: "Actions", disableSort: true },
182182
];
183183

184-
const ModManagerBanner = () => (
185-
<NewAlert csVariant="info">
186-
Please note that the install buttons only work if you have compatible client
187-
software installed, such as the{" "}
188-
<a href="https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager">
189-
Thunderstore Mod Manager.
190-
</a>{" "}
191-
Otherwise use the zip download links instead.
192-
</NewAlert>
193-
);
194-
195184
const DownloadLink = (props: { download_url: string }) => (
196185
<NewButton
197186
csVariant="secondary"

apps/cyberstorm-remix/app/p/tabs/Versions/PackageVersionWithoutCommunityVersions.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
NewTable,
1010
NewTableLabels,
1111
Heading,
12-
NewAlert,
1312
SkeletonBox,
1413
NewLink,
1514
} from "@thunderstore/cyberstorm";
@@ -30,6 +29,7 @@ import {
3029
} from "cyberstorm/security/publicEnvVariables";
3130
import { Suspense } from "react";
3231
import { isSemver } from "cyberstorm/utils/typeChecks";
32+
import { ModManagerBanner } from "./common";
3333

3434
export async function loader({ params }: LoaderFunctionArgs) {
3535
if (params.namespaceId && params.packageId) {
@@ -181,17 +181,6 @@ const columns: NewTableLabels = [
181181
{ value: "Actions", disableSort: true },
182182
];
183183

184-
const ModManagerBanner = () => (
185-
<NewAlert csVariant="info">
186-
Please note that the install buttons only work if you have compatible client
187-
software installed, such as the{" "}
188-
<a href="https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager">
189-
Thunderstore Mod Manager.
190-
</a>{" "}
191-
Otherwise use the zip download links instead.
192-
</NewAlert>
193-
);
194-
195184
const DownloadLink = (props: { download_url: string }) => (
196185
<NewButton
197186
csVariant="secondary"

apps/cyberstorm-remix/app/p/tabs/Versions/Versions.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
NewTable,
1010
NewTableLabels,
1111
Heading,
12-
NewAlert,
1312
SkeletonBox,
1413
NewLink,
1514
} from "@thunderstore/cyberstorm";
@@ -30,6 +29,7 @@ import {
3029
} from "cyberstorm/security/publicEnvVariables";
3130
import { Suspense } from "react";
3231
import { isSemver } from "cyberstorm/utils/typeChecks";
32+
import { ModManagerBanner } from "./common";
3333

3434
export async function loader({ params }: LoaderFunctionArgs) {
3535
if (params.communityId && params.namespaceId && params.packageId) {
@@ -181,17 +181,6 @@ const columns: NewTableLabels = [
181181
{ value: "Actions", disableSort: true },
182182
];
183183

184-
const ModManagerBanner = () => (
185-
<NewAlert csVariant="info">
186-
Please note that the install buttons only work if you have compatible client
187-
software installed, such as the{" "}
188-
<a href="https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager">
189-
Thunderstore Mod Manager.
190-
</a>{" "}
191-
Otherwise use the zip download links instead.
192-
</NewAlert>
193-
);
194-
195184
const DownloadLink = (props: { download_url: string }) => (
196185
<NewButton
197186
csVariant="secondary"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { NewAlert } from "@thunderstore/cyberstorm";
2+
import { memo } from "react";
3+
4+
export const ModManagerBanner = memo(function ModManagerBanner() {
5+
return (
6+
<NewAlert csVariant="info">
7+
Please note that the install buttons only work if you have compatible
8+
client software installed, such as the{" "}
9+
<a href="https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager">
10+
Thunderstore Mod Manager.
11+
</a>{" "}
12+
Otherwise use the zip download links instead.
13+
</NewAlert>
14+
);
15+
});

0 commit comments

Comments
 (0)