fix: add tooltip, truncate (#5096)

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/5107/head^2
Udit Takkar 2022-10-19 23:30:48 +05:30 committed by GitHub
parent 8ece2525e5
commit ee084aa8bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 4 deletions

View File

@ -1,5 +1,6 @@
import { getEventLocationType, locationKeyToString } from "@calcom/app-store/locations";
import { classNames } from "@calcom/lib";
import Tooltip from "@calcom/ui/v2/core/Tooltip";
import { Props } from "./pages/AvailabilityPage";
@ -22,10 +23,16 @@ export function AvailableEventLocations({ locations }: { locations: Props["event
)}
alt={`${eventLocationType.label} icon`}
/>
<span className="max-w-full pr-4" key={location.type}>
<Tooltip content={locationKeyToString(location)}>
<a
target="_blank"
href={locationKeyToString(location) ?? "/"}
className="truncate"
key={location.type}
rel="noreferrer">
{locationKeyToString(location)}
</span>
</a>
</Tooltip>
</div>
);
})}