small updates
This commit is contained in:
@@ -7,9 +7,7 @@ import { useImageUploader } from '@utils/hooks/useUploader';
|
||||
export function BannerUploader({
|
||||
setBanner,
|
||||
}: {
|
||||
setBanner: Dispatch<
|
||||
SetStateAction<{ url: undefined | string; error?: undefined | string }>
|
||||
>;
|
||||
setBanner: Dispatch<SetStateAction<string>>;
|
||||
}) {
|
||||
const upload = useImageUploader();
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -18,7 +16,7 @@ export function BannerUploader({
|
||||
setLoading(true);
|
||||
const image = await upload(null);
|
||||
if (image.url) {
|
||||
setBanner(image);
|
||||
setBanner(image.url);
|
||||
}
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
@@ -25,7 +25,6 @@ export function NIP05({
|
||||
try {
|
||||
const localPath = nip05.split('@')[0];
|
||||
const service = nip05.split('@')[1];
|
||||
// #TODO: use tauri native fetch to avoid CORS
|
||||
const verifyURL = `https://${service}/.well-known/nostr.json?name=${localPath}`;
|
||||
|
||||
const res = await fetch(verifyURL, {
|
||||
|
||||
@@ -49,7 +49,7 @@ export function LinkPreview({ urls }: { urls: string[] }) {
|
||||
{data.title}
|
||||
</h5>
|
||||
{data.description && (
|
||||
<p className="line-clamp-3 break-words text-sm text-white/50">
|
||||
<p className="line-clamp-3 break-all text-sm text-white/50">
|
||||
{data.description}
|
||||
</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user