add initialData to queries

This commit is contained in:
daniel31x13
2024-08-01 18:40:08 -04:00
parent 75b1ae738f
commit a73e5fa6c6
35 changed files with 46 additions and 39 deletions
@@ -46,7 +46,7 @@ export default function EditCollectionSharingModal({
}
};
const { data: user = [] } = useUser();
const { data: user } = useUser();
const permissions = usePermissions(collection.id as number);
const currentURL = new URL(document.URL);
+1 -1
View File
@@ -43,7 +43,7 @@ export default function NewLinkModal({ onClose }: Props) {
const [submitLoader, setSubmitLoader] = useState(false);
const [optionsExpanded, setOptionsExpanded] = useState(false);
const router = useRouter();
const { data: collections = [] } = useCollections();
const { data: collections } = useCollections();
const setCollection = (e: any) => {
if (e?.__isNew__) e.value = null;
@@ -30,7 +30,7 @@ export default function PreservedFormatsModal({ onClose, activeLink }: Props) {
const { t } = useTranslation();
const session = useSession();
const { getLink } = useLinkStore();
const { data: user = [] } = useUser();
const { data: user } = useUser();
const [link, setLink] =
useState<LinkIncludingShortenedCollectionAndTags>(activeLink);
const router = useRouter();
+1 -1
View File
@@ -49,7 +49,7 @@ export default function UploadFileModal({ onClose }: Props) {
const [submitLoader, setSubmitLoader] = useState(false);
const [optionsExpanded, setOptionsExpanded] = useState(false);
const router = useRouter();
const { data: collections = [] } = useCollections();
const { data: collections } = useCollections();
const setCollection = (e: any) => {
if (e?.__isNew__) e.value = null;