feat: even more for URLs

This commit is contained in:
diced 2022-10-28 17:41:46 -07:00
parent 3df94526b0
commit f9249b1380
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
2 changed files with 10 additions and 0 deletions

View file

@ -57,6 +57,14 @@ export default function URLCard({ url }: { url: URLResponse }) {
</div>
</Tooltip>
{url.vanity && <MutedText size='sm'>ID: {url.id}</MutedText>}
{url.maxViews && (
<Tooltip label='This URL will delete itself after reaching this treshold.'>
<div>
<MutedText size='sm'>Max Views: {url.maxViews}</MutedText>
</div>
</Tooltip>
)}
<MutedText size='sm'>Views: {url.views}</MutedText>
<MutedText size='sm'>
URL: <Link href={url.destination}>{url.destination}</Link>
</MutedText>

View file

@ -7,6 +7,8 @@ export type URLResponse = {
id: string;
url: string;
vanity: string;
maxViews?: number;
views: number;
};
export function useURLs() {