small updates

This commit is contained in:
Ren Amamiya
2023-09-05 08:50:13 +07:00
parent 57c17ffbf9
commit 4019623d99
12 changed files with 343 additions and 280 deletions

View File

@@ -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);
};

View File

@@ -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, {

View File

@@ -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>
)}