bug fix
This commit is contained in:
@@ -322,7 +322,7 @@ export default function Index() {
|
||||
placeholderCount={1}
|
||||
useData={data}
|
||||
/>
|
||||
{!data.isLoading && !links[0] && <NoLinksFound />}
|
||||
{!data.isLoading && links && !links[0] && <NoLinksFound />}
|
||||
</div>
|
||||
{activeCollection && (
|
||||
<>
|
||||
|
||||
@@ -58,7 +58,7 @@ export default function Index() {
|
||||
placeholderCount={1}
|
||||
useData={data}
|
||||
/>
|
||||
{!data.isLoading && !links[0] && (
|
||||
{!data.isLoading && links && !links[0] && (
|
||||
<NoLinksFound text={t("you_have_not_added_any_links")} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@ export default function PinnedLinks() {
|
||||
placeholderCount={1}
|
||||
useData={data}
|
||||
/>
|
||||
{!data.isLoading && !links[0] && (
|
||||
{!data.isLoading && links && !links[0] && (
|
||||
<div
|
||||
style={{ flex: "1 1 auto" }}
|
||||
className="flex flex-col gap-2 justify-center h-full w-full mx-auto p-10"
|
||||
|
||||
@@ -230,7 +230,9 @@ export default function PublicCollections() {
|
||||
placeholderCount={1}
|
||||
useData={data}
|
||||
/>
|
||||
{!data.isLoading && !links[0] && <p>{t("collection_is_empty")}</p>}
|
||||
{!data.isLoading && links && !links[0] && (
|
||||
<p>{t("collection_is_empty")}</p>
|
||||
)}
|
||||
|
||||
{/* <p className="text-center text-neutral">
|
||||
List created with <span className="text-black">Linkwarden.</span>
|
||||
|
||||
@@ -203,17 +203,14 @@ export default function Account() {
|
||||
<div>
|
||||
<p className="mb-2">{t("language")}</p>
|
||||
<select
|
||||
value={user.locale || ""}
|
||||
onChange={(e) => {
|
||||
setUser({ ...user, locale: e.target.value });
|
||||
}}
|
||||
className="select border border-neutral-content focus:outline-none focus:border-primary duration-100 w-full bg-base-200 rounded-[0.375rem] min-h-0 h-[2.625rem] leading-4 p-2"
|
||||
>
|
||||
{i18n.locales.map((locale) => (
|
||||
<option
|
||||
key={locale}
|
||||
value={locale}
|
||||
selected={user.locale === locale}
|
||||
>
|
||||
<option key={locale} value={locale}>
|
||||
{new Intl.DisplayNames(locale, { type: "language" }).of(
|
||||
locale
|
||||
) || ""}
|
||||
|
||||
+1
-1
@@ -114,8 +114,8 @@ export default function Index() {
|
||||
if (error) {
|
||||
toast.error(error.message);
|
||||
} else {
|
||||
router.push("/links");
|
||||
toast.success(t("tag_deleted"));
|
||||
router.push("/links");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user