Skip to content

Commit

Permalink
app routes _index: use popover instead of tooltip
Browse files Browse the repository at this point in the history
Unfortunately Radix tooltips do not work on mobile (no hover events). See
discussion: radix-ui/primitives#955
  • Loading branch information
cmnord committed Mar 17, 2023
1 parent ed9957d commit c21e8b5
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import {
} from "~/components/error";
import GameCard from "~/components/game-card";
import { QuestionMarkCircle } from "~/components/icons";
import Popover from "~/components/popover";
import Search from "~/components/search";
import Toggle from "~/components/toggle";
import Tooltip from "~/components/tooltip";
import Upload from "~/components/upload";

import { getAllGames } from "~/models/game.server";
Expand Down Expand Up @@ -132,22 +132,14 @@ export default function Index() {
>
Solo mode {optimisticSolo ? "on" : "off"}
</p>
<Tooltip
content={
<span>
In solo mode, no other players can join the game.
<br />
If you refresh the page the game will reset.
</span>
}
>
<Popover content="In solo mode, no other players can join the game. If you refresh the page the game will reset.">
<button>
<QuestionMarkCircle
outlined
className="w-4 h-4 text-gray-400"
/>
</button>
</Tooltip>
</Popover>
</div>
</div>
</Form>
Expand Down

0 comments on commit c21e8b5

Please sign in to comment.