Add recommendation tooltips
This commit is contained in:
parent
f021eb4809
commit
3c912a4591
@ -5,6 +5,8 @@ import { ServerPlatform } from "restfulmc-lib";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import SimpleTooltip from "@/components/simple-tooltip";
|
||||||
|
import { capitalize } from "@/lib/string-utils";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The recommendations for a server.
|
* The recommendations for a server.
|
||||||
@ -45,6 +47,9 @@ const ServerRecommendations = (): ReactElement => (
|
|||||||
index: number
|
index: number
|
||||||
): ReactElement => (
|
): ReactElement => (
|
||||||
<Link key={index} href={`/server/${platform}/${hostname}`}>
|
<Link key={index} href={`/server/${platform}/${hostname}`}>
|
||||||
|
<SimpleTooltip
|
||||||
|
content={`Click to test ${capitalize(platform)} server`}
|
||||||
|
>
|
||||||
<Button
|
<Button
|
||||||
className="px-10 flex gap-2.5 font-semibold hover:opacity-85 transition-all transform-gpu"
|
className="px-10 flex gap-2.5 font-semibold hover:opacity-85 transition-all transform-gpu"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@ -57,6 +62,7 @@ const ServerRecommendations = (): ReactElement => (
|
|||||||
/>
|
/>
|
||||||
<span>{hostname}</span>
|
<span>{hostname}</span>
|
||||||
</Button>
|
</Button>
|
||||||
|
</SimpleTooltip>
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user