Skip to content

Commit

Permalink
add 'Flush Cloudflare cache button (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
maaaathis authored Feb 16, 2024
1 parent d82a666 commit fa9c53f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use client';

import { ExternalLink } from 'lucide-react';
import Link from 'next/link';
import { FC } from 'react';

import { Button } from '@/components/ui/button';

export const FlushCloudflareDnsCacheButton: FC = () => {
return (
<Link
href="https://1.1.1.1/purge-cache/"
target="_blank"
rel="noopener"
className="my-auto"
>
<Button variant="outline" className="rounded-lg text-sm font-medium">
Flush Cloudflare DNS Cache
<ExternalLink className="ml-2 h-3 w-3" />
</Button>
</Link>
);
};

export default FlushCloudflareDnsCacheButton;
2 changes: 2 additions & 0 deletions app/lookup/[domain]/dns/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React from 'react';

import DnsHistoryButton from '@/app/lookup/[domain]/dns/_components/DnsHistoryButton';
import DnsTable from '@/app/lookup/[domain]/dns/_components/DnsTable';
import FlushCloudflareDnsCacheButton from '@/app/lookup/[domain]/dns/_components/FlushCloudflareDnsCacheButton';
import FlushGoogleDnsCacheButton from '@/app/lookup/[domain]/dns/_components/FlushGoogleDnsCacheButton';
import LocationSelector from '@/app/lookup/[domain]/dns/_components/LocationSelector';
import ResolverSelector from '@/app/lookup/[domain]/dns/_components/ResolverSelector';
Expand Down Expand Up @@ -114,6 +115,7 @@ const LookupDomain: FC<LookupDomainProps> = async ({
</div>
<div className="flex flex-col gap-2 sm:gap-4 md:flex-row">
{resolverName === 'google' && <FlushGoogleDnsCacheButton />}
{resolverName === 'cloudflare' && <FlushCloudflareDnsCacheButton />}
<DnsHistoryButton domain={domain} />
</div>
</div>
Expand Down

1 comment on commit fa9c53f

@vercel
Copy link

@vercel vercel bot commented on fa9c53f Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

digga – ./

digga-git-main-maathis.vercel.app
digger.vercel.app
digga-maathis.vercel.app
digga.dev

Please sign in to comment.