feat: even more for URLs
This commit is contained in:
parent
3df94526b0
commit
f9249b1380
2 changed files with 10 additions and 0 deletions
|
@ -57,6 +57,14 @@ export default function URLCard({ url }: { url: URLResponse }) {
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{url.vanity && <MutedText size='sm'>ID: {url.id}</MutedText>}
|
{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'>
|
<MutedText size='sm'>
|
||||||
URL: <Link href={url.destination}>{url.destination}</Link>
|
URL: <Link href={url.destination}>{url.destination}</Link>
|
||||||
</MutedText>
|
</MutedText>
|
||||||
|
|
|
@ -7,6 +7,8 @@ export type URLResponse = {
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
vanity: string;
|
vanity: string;
|
||||||
|
maxViews?: number;
|
||||||
|
views: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function useURLs() {
|
export function useURLs() {
|
||||||
|
|
Loading…
Reference in a new issue