remove more ternaries
This commit is contained in:
+2
-2
@@ -104,9 +104,9 @@ export default function Admin() {
|
||||
<p>{t("no_users_found")}</p>
|
||||
)}
|
||||
|
||||
{newUserModal ? (
|
||||
{newUserModal && (
|
||||
<NewUserModal onClose={() => setNewUserModal(false)} />
|
||||
) : null}
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -229,13 +229,13 @@ export default function Index() {
|
||||
);
|
||||
})
|
||||
.slice(0, 3)}
|
||||
{activeCollection.members.length - 3 > 0 ? (
|
||||
{activeCollection.members.length - 3 > 0 && (
|
||||
<div className={`avatar drop-shadow-md placeholder -ml-3`}>
|
||||
<div className="bg-base-100 text-neutral rounded-full w-8 h-8 ring-2 ring-neutral-content">
|
||||
<span>+{activeCollection.members.length - 3}</span>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
)}
|
||||
</div>
|
||||
|
||||
<p className="text-neutral text-sm">
|
||||
|
||||
+4
-4
@@ -60,11 +60,11 @@ export default function Dashboard() {
|
||||
handleNumberOfLinksToShow();
|
||||
}, [width]);
|
||||
|
||||
const importBookmarks = async (e: any, format: MigrationFormat) => {
|
||||
const file: File = e.target.files[0];
|
||||
const importBookmarks = async (e: React.ChangeEvent<HTMLInputElement>, format: MigrationFormat) => {
|
||||
const file: File | null = e.target.files && e.target.files[0];
|
||||
|
||||
if (file) {
|
||||
var reader = new FileReader();
|
||||
const reader = new FileReader();
|
||||
reader.readAsText(file, "UTF-8");
|
||||
reader.onload = async function (e) {
|
||||
const load = toast.loading("Importing...");
|
||||
@@ -81,7 +81,7 @@ export default function Dashboard() {
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
await response.json();
|
||||
|
||||
toast.dismiss(load);
|
||||
|
||||
|
||||
@@ -171,13 +171,13 @@ export default function PublicCollections() {
|
||||
);
|
||||
})
|
||||
.slice(0, 3)}
|
||||
{collection.members.length - 3 > 0 ? (
|
||||
{collection.members.length - 3 > 0 && (
|
||||
<div className={`avatar drop-shadow-md placeholder -ml-3`}>
|
||||
<div className="bg-base-100 text-neutral rounded-full w-8 h-8 ring-2 ring-neutral-content">
|
||||
<span>+{collection.members.length - 3}</span>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
)}
|
||||
</div>
|
||||
|
||||
<p className="text-neutral text-sm">
|
||||
|
||||
Reference in New Issue
Block a user