Skip to content

Commit

Permalink
Added Add to Slack button and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodellosso committed Jul 10, 2024
1 parent 6ba83ef commit d3b9f86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions components/AddToSlack.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function AddToSlack() {
return (
<a href="https://slack.com/oauth/v2/authorize?client_id=10831824934.7404945710466&scope=chat:write,commands&user_scope=chat:write,email,openid">
<img alt="Add to Slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png"
srcSet="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x" />
</a>
);
}
4 changes: 3 additions & 1 deletion pages/[teamSlug]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { validName } from "@/lib/client/InputVerification";
import { BsSlack } from "react-icons/bs";
import { games } from "@/lib/games";
import { defaultGameId } from "@/lib/client/GameId";
import AddToSlack from "@/components/AddToSlack";

const api = new ClientAPI("gearboxiscool");

Expand Down Expand Up @@ -448,7 +449,8 @@ export default function TeamIndex(props: TeamPageProps) {
Not linked to Slack.
{ team?.owners.includes(session?.user?._id ?? "") &&
<>
{" "}Run <span className="text-accent">/link-notifications {team.number}</span> followed by
<AddToSlack />
{" "}Then run <span className="text-accent">/link-notifications {team.number}</span> followed by
{" "}<span className="text-accent">/invite @Gearbox</span> in Slack to link notifications.
</>
}
Expand Down
1 change: 1 addition & 0 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default function Document() {
<Html lang="en" data-theme="dark">
<Head>
<PwaConfig />
<meta name="slack-app-id" content="A07BWTTLWDQ" />
</Head>
<body>
<Main />
Expand Down

0 comments on commit d3b9f86

Please sign in to comment.