-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rohan Nair <[email protected]>
- Loading branch information
Showing
17 changed files
with
96 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export default function Dashboard() { | ||
return <h1>Dashboard</h1> | ||
return <div className="p4"><h1>Dashboard</h1></div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
CircleCheckIcon, | ||
CircleDashedIcon, | ||
CircleDotDashedIcon, | ||
CircleXIcon, | ||
} from 'lucide-react' | ||
import { match } from 'ts-pattern' | ||
|
||
export type LinkStatus = 'submitted' | 'processing' | 'completed' | 'error' | ||
export function StatusIcon({ status }: { status: LinkStatus }) { | ||
return match(status) | ||
.with('submitted', () => ( | ||
<span className="text-yellow-500"> | ||
<CircleDashedIcon className="size-3" /> | ||
</span> | ||
)) | ||
.with('processing', () => ( | ||
<span className="text-yellow-500"> | ||
<CircleDotDashedIcon className="size-3" /> | ||
</span> | ||
)) | ||
.with('completed', () => ( | ||
<span className="text-green-500"> | ||
<CircleCheckIcon className="size-3" /> | ||
</span> | ||
)) | ||
.otherwise(() => ( | ||
<span className="text-red-500"> | ||
<CircleXIcon className="size-3" /> | ||
</span> | ||
)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './StatusIcon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Fragment_Mono, Instrument_Sans } from 'next/font/google' | ||
|
||
export const fontSans = Instrument_Sans({ | ||
subsets: ['latin'], | ||
variable: '--font-sans', | ||
}) | ||
|
||
export const fontMono = Fragment_Mono({ | ||
subsets: ['latin'], | ||
variable: '--font-mono', | ||
weight: ['400'], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export function getBaseDomain(url: string): string { | ||
const hostname = new URL(url).hostname | ||
const parts = hostname.split('.') | ||
const hostname = new URL(url).hostname; | ||
const parts = hostname.split("."); | ||
|
||
return parts.length > 2 ? parts.slice(-2).join('.') : hostname | ||
return parts.length > 2 ? parts.slice(-2).join(".") : hostname; | ||
} |