Skip to content

Commit

Permalink
Merge pull request #885 from thunderstore-io/cyberstorm-package-missi…
Browse files Browse the repository at this point in the history
…ng-link

Missing discord and GitHub links under the package description
  • Loading branch information
MythicManiac authored Nov 6, 2023
2 parents f050cbc + 811655a commit 3d16c70
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { useState } from "react";
import { Tabs } from "../../Tabs/Tabs";
import { PackageChangeLog } from "./PackageChangeLog/PackageChangeLog";
import { PackageVersions } from "./PackageVersions/PackageVersions";
import { faGithub } from "@fortawesome/free-brands-svg-icons";
import { faDiscord, faGithub } from "@fortawesome/free-brands-svg-icons";
import {
faCodeBranch,
faFileLines,
Expand Down Expand Up @@ -99,6 +99,18 @@ export function PackageDetailLayout(props: PackageDetailLayoutProps) {
</a>
);
}
if (packageData.discordLink) {
packageDetailsMeta.push(
<a key="discord" href={packageData.discordLink}>
<Button.Root>
<Button.ButtonLabel>Discord</Button.ButtonLabel>
<Button.ButtonIcon>
<FontAwesomeIcon icon={faDiscord} />
</Button.ButtonIcon>
</Button.Root>
</a>
);
}

return (
<BaseLayout
Expand Down
2 changes: 2 additions & 0 deletions packages/dapper-fake/src/fakers/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ const getPackageExtras = () => ({
lastUpdated: faker.date.recent({ days: 700 }).toDateString(),
likes: faker.number.int({ min: 0, max: 100000 }),
size: faker.number.int({ min: 20000, max: 10000000 }),
gitHubLink: faker.internet.url(),
discordLink: faker.internet.url(),
});

const getPackageTeam = async (teamId: string) => {
Expand Down
1 change: 1 addition & 0 deletions packages/dapper/src/types/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface Package extends PackagePreview {
shortDescription?: string;
additionalImages?: string[];
gitHubLink?: string;
discordLink?: string;
firstUploaded?: string;
dependencyString: string;
dependencies?: PackageDependency[];
Expand Down

0 comments on commit 3d16c70

Please sign in to comment.