Skip to content

Commit

Permalink
feat: add links to 2-minute tabletop tokens (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
micahg authored Jan 4, 2025
1 parent e81305e commit 9d9e253
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ interface CreateTokenFormComponentProps {
modal?: boolean;
}

export const TwoMinuteTableTop = () => (
<p>
Need tokens? Try{" "}
<a
href="https://tools.2minutetabletop.com/"
target="_blank"
rel="noreferrer"
>
2-Minute Tabletop
</a>{" "}
and add them to your assets.
</p>
);

const CreateTokenFormComponent = ({
token,
modal,
Expand Down Expand Up @@ -109,6 +123,7 @@ const CreateTokenFormComponent = ({
}}
>
{modal && <ErrorAlertComponent />}
{modal && <TwoMinuteTableTop />}
<FormControl fullWidth>
<Controller
name="name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ErrorAlertComponent from "../ErrorAlertComponent/ErrorAlertComponent.lazy
import { Token } from "@micahg/tbltp-common";
import { AppReducerState } from "../../reducers/AppReducer";
import CreateTokenFormComponent from "../CreateTokenFormComponent/CreateTokenFormComponent.lazy";
import { TwoMinuteTableTop } from "../CreateTokenFormComponent/CreateTokenFormComponent";

interface TokensComponentProps {
populateToolbar?: (actions: GameMasterAction[]) => void;
Expand Down Expand Up @@ -57,6 +58,9 @@ const TokensComponent = ({ populateToolbar }: TokensComponentProps) => {
// 100vh - 64px for the toolbar - 8px for the paddings
<Box sx={{ overflow: "auto", height: `calc(100vh - 72px)` }}>
<ErrorAlertComponent sticky={true} />
<Box sx={{ paddingLeft: "12px", paddingRight: "12px" }}>
<TwoMinuteTableTop />
</Box>
<Grid container columns={{ xs: 2, sm: 2, md: 2 }}>
{tokens &&
tokens.map((token: Token) => (
Expand Down

0 comments on commit 9d9e253

Please sign in to comment.