-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into track_selection
- Loading branch information
Showing
9 changed files
with
111 additions
and
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' | ||
import { AlertCircle } from 'lucide-react' | ||
import { AlertCircle, InfoIcon } from 'lucide-react' | ||
|
||
interface Props { | ||
title: string | ||
message: string | ||
title?: string | ||
message: string | React.ReactNode | ||
variant?: 'default' | 'destructive' | null | ||
} | ||
|
||
export const AlertNote = ({ title, message, variant = 'default' }: Props) => ( | ||
<Alert variant={variant}> | ||
<AlertCircle className="h-4 w-4" /> | ||
<AlertTitle>{title}</AlertTitle> | ||
{variant === 'destructive' && <AlertCircle className="h-4 w-4" />} | ||
{variant === 'default' && <InfoIcon className="h-4 w-4" />} | ||
{title && <AlertTitle>{title}</AlertTitle>} | ||
<AlertDescription>{message}</AlertDescription> | ||
</Alert> | ||
) |
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,8 @@ | ||
import { useNetwork } from '@/contexts/NetworkContext' | ||
|
||
export const useGetSubsquareRefUrl = () => { | ||
const { network } = useNetwork() | ||
|
||
return (refId: number) => | ||
`https://${network}.subsquare.io/referenda/${refId.toString()}` | ||
} |
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
Oops, something went wrong.