Skip to content

Commit

Permalink
add spaceship ad
Browse files Browse the repository at this point in the history
  • Loading branch information
aelew committed Feb 6, 2024
1 parent 7902142 commit ba1469c
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 66 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@

The cyber swiss army knife of lookup tools. Research information on domains, IP addresses, email addresses, phone numbers, and more.

Demo: [lookup.tools](https://lookup.tools)
Check out the hosted version here: [lookup.tools](https://lookup.tools)

> [!NOTE]
> lookup.tools is currently a work in progress. If you have any feedback or suggestions, feel free to open an issue or pull request!
## Built with

## Tech stack
- [Next.js](https://nextjs.org): The React framework for the web
- [tRPC](https://trpc.io): End-to-end typesafe APIs
- [create-t3-app](https://create.t3.gg): The best way to start a full-stack, typesafe Next.js app
- [Tailwind CSS](https://tailwindcss.com): A utility-first CSS framework
- [shadcn/ui](https://ui.shadcn.com): Beautifully designed components
- [Pigeon Maps](https://pigeon-maps.js.org): Maps without external dependencies

- Starter: [create-t3-app](https://create.t3.gg)
- Framework: [Next.js](https://nextjs.org)
- CSS: [Tailwind CSS](https://tailwindcss.com)
- Components: [shadcn/ui](https://ui.shadcn.com)
- Backend: [tRPC](https://trpc.io)
- Maps: [Pigeon Maps](https://pigeon-maps.js.org)
<a href="https://spaceship.sjv.io/c/5212322/1825519/21274" target="_blank" id="1825519"><img src="https://a.impactradius-go.com/display-ad/21274-1825519" border="0" alt="" style="flex-shrink:0;" /></a><img height="0" width="0" src="https://imp.pxf.io/i/5212322/1825519/21274" style="position:absolute;visibility:hidden;" border="0" />

## Development

Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const config = {
},
images: {
remotePatterns: [
{ protocol: 'https', hostname: 'a.impactradius-go.com' },
{ protocol: 'https', hostname: 'favicon.victr.me' },
{ protocol: 'https', hostname: 'flagsapi.com' }
]
Expand Down
1 change: 0 additions & 1 deletion src/app/(tools)/(domain)/_components/domain-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export function DomainHeader({
<Image
className="aspect-square rounded-lg bg-accent/75 object-contain p-1 shadow ring-1 ring-muted-foreground/25"
src={`https://favicon.victr.me/blob/https://${domain}`}
unoptimized
height={36}
width={36}
alt=""
Expand Down
40 changes: 36 additions & 4 deletions src/app/(tools)/(domain)/_components/domain-not-registered.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Image from 'next/image';
import Link from 'next/link';

import { XCircleIcon } from '@/components/icons/x-circle';
import { Button } from '@/components/ui/button';
import { Card } from '@/components/ui/card';
import { env } from '@/env';

interface DomainNotRegisteredProps {
domain: string;
Expand All @@ -15,10 +18,39 @@ export function DomainNotRegistered({ domain }: DomainNotRegisteredProps) {
Domain not found
</h1>
<div className="max-w-sm text-balance break-words">
Looks like <span className="font-medium">{domain}</span> hasn&apos;t
been registered yet. Click the button below to purchase it!
Looks like the domain <span className="font-medium">{domain}</span>{' '}
hasn&apos;t been registered yet.
</div>
<Button disabled>Coming soon!</Button>
{env.NEXT_PUBLIC_IS_MAIN_INSTANCE === '1' && (
<>
<Link
id="1825518"
target="_blank"
href={
'https://spaceship.sjv.io/c/5212322/1825518/21274?u=' +
encodeURIComponent(
`https://www.spaceship.com/domain-search/?query=${domain}&tab=domains`
)
}
>
<Image
className="rounded-lg shadow-lg transition-opacity hover:opacity-90"
src="https://a.impactradius-go.com/display-ad/21274-1825518"
alt="Spaceship affiliate ad"
height={201}
width={384}
/>
</Link>
<Image
src="https://imp.pxf.io/i/5212322/1825518/21274"
className="invisible absolute"
unoptimized
height={0}
width={0}
alt=""
/>
</>
)}
</div>
</Card>
);
Expand Down
1 change: 0 additions & 1 deletion src/app/(tools)/(domain)/whois/[domain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export default async function WhoisLookupResultPage({
src={`https://favicon.victr.me/blob/https://${nsDomain}`}
className="aspect-square select-none"
draggable={false}
unoptimized
height={20}
width={20}
alt=""
Expand Down
98 changes: 49 additions & 49 deletions src/components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
"use client"
'use client';

import * as React from "react"
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
import {
CheckIcon,
ChevronRightIcon,
DotFilledIcon,
} from "@radix-ui/react-icons"
DotFilledIcon
} from '@radix-ui/react-icons';
import * as React from 'react';

import { cn } from "@/lib/utils"
import { cn } from '@/lib/utils';

const DropdownMenu = DropdownMenuPrimitive.Root
const DropdownMenu = DropdownMenuPrimitive.Root;

const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;

const DropdownMenuGroup = DropdownMenuPrimitive.Group
const DropdownMenuGroup = DropdownMenuPrimitive.Group;

const DropdownMenuPortal = DropdownMenuPrimitive.Portal
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;

const DropdownMenuSub = DropdownMenuPrimitive.Sub
const DropdownMenuSub = DropdownMenuPrimitive.Sub;

const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;

const DropdownMenuSubTrigger = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
inset?: boolean
inset?: boolean;
}
>(({ className, inset, children, ...props }, ref) => (
<DropdownMenuPrimitive.SubTrigger
ref={ref}
className={cn(
"flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
'flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',
inset && 'pl-8',
className
)}
{...props}
>
{children}
<ChevronRightIcon className="ml-auto h-4 w-4" />
</DropdownMenuPrimitive.SubTrigger>
))
));
DropdownMenuSubTrigger.displayName =
DropdownMenuPrimitive.SubTrigger.displayName
DropdownMenuPrimitive.SubTrigger.displayName;

const DropdownMenuSubContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
Expand All @@ -51,14 +51,14 @@ const DropdownMenuSubContent = React.forwardRef<
<DropdownMenuPrimitive.SubContent
ref={ref}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
className
)}
{...props}
/>
))
));
DropdownMenuSubContent.displayName =
DropdownMenuPrimitive.SubContent.displayName
DropdownMenuPrimitive.SubContent.displayName;

const DropdownMenuContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
Expand All @@ -69,33 +69,33 @@ const DropdownMenuContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md',
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
className
)}
{...props}
/>
</DropdownMenuPrimitive.Portal>
))
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
));
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;

const DropdownMenuItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean
inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
inset && 'pl-8',
className
)}
{...props}
/>
))
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
));
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;

const DropdownMenuCheckboxItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
Expand All @@ -104,7 +104,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
<DropdownMenuPrimitive.CheckboxItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className
)}
checked={checked}
Expand All @@ -117,9 +117,9 @@ const DropdownMenuCheckboxItem = React.forwardRef<
</span>
{children}
</DropdownMenuPrimitive.CheckboxItem>
))
));
DropdownMenuCheckboxItem.displayName =
DropdownMenuPrimitive.CheckboxItem.displayName
DropdownMenuPrimitive.CheckboxItem.displayName;

const DropdownMenuRadioItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
Expand All @@ -128,7 +128,7 @@ const DropdownMenuRadioItem = React.forwardRef<
<DropdownMenuPrimitive.RadioItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className
)}
{...props}
Expand All @@ -140,51 +140,51 @@ const DropdownMenuRadioItem = React.forwardRef<
</span>
{children}
</DropdownMenuPrimitive.RadioItem>
))
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
));
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;

const DropdownMenuLabel = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
inset?: boolean
inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Label
ref={ref}
className={cn(
"px-2 py-1.5 text-sm font-semibold",
inset && "pl-8",
'px-2 py-1.5 text-sm font-semibold',
inset && 'pl-8',
className
)}
{...props}
/>
))
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
));
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;

const DropdownMenuSeparator = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
>(({ className, ...props }, ref) => (
<DropdownMenuPrimitive.Separator
ref={ref}
className={cn("-mx-1 my-1 h-px bg-muted", className)}
className={cn('-mx-1 my-1 h-px bg-muted', className)}
{...props}
/>
))
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
));
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;

const DropdownMenuShortcut = ({
className,
...props
}: React.HTMLAttributes<HTMLSpanElement>) => {
return (
<span
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
className={cn('ml-auto text-xs tracking-widest opacity-60', className)}
{...props}
/>
)
}
DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
);
};
DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';

export {
DropdownMenu,
Expand All @@ -201,5 +201,5 @@ export {
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuRadioGroup,
}
DropdownMenuRadioGroup
};
2 changes: 1 addition & 1 deletion src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;

--destructive: 0 62.8% 30.6%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;

--border: 240 3.7% 15.9%;
Expand Down

0 comments on commit ba1469c

Please sign in to comment.