A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz

[web] fix dropbox/googledrive navigation

+26 -16
+6
apps/web/src/api/dropbox.ts
··· 10 10 path: string; 11 11 fileId: string; 12 12 }; 13 + directory: { 14 + id: string; 15 + name: string; 16 + path: string; 17 + fileId: string; 18 + }; 13 19 directories: { 14 20 id: string; 15 21 name: string;
+6
apps/web/src/api/googledrive.ts
··· 8 8 path: string; 9 9 fileId: string; 10 10 }; 11 + directory: { 12 + id: string; 13 + name: string; 14 + path: string; 15 + fileId: string; 16 + }; 11 17 directories: { 12 18 id: string; 13 19 name: string;
+7 -8
apps/web/src/pages/dropbox/Dropbox.tsx
··· 19 19 20 20 const Dropbox = (props: DropboxProps) => { 21 21 const { data, isLoading } = useFilesQuery(props.fileId); 22 - const { data: parent } = useFilesQuery(data?.parentDirectory?.fileId); 23 22 24 23 const playFile = async (id: string) => { 25 24 console.log(">> Playing file:", id); ··· 155 154 { 156 155 <Link 157 156 to={ 158 - parent?.parentDirectory?.path === "/Music" 157 + data?.parentDirectory?.path === "/Music" 159 158 ? `/dropbox` 160 159 : `/dropbox/$id` 161 160 } 162 - params={{ id: parent?.parentDirectory?.fileId || "" }} 161 + params={{ id: data?.parentDirectory?.fileId || "" }} 163 162 className="!text-[var(--color-text)]" 164 163 > 165 - {parent?.parentDirectory?.path === "/Music" 166 - ? "" 167 - : parent?.parentDirectory?.name} 164 + {data?.parentDirectory?.path === "/Music" 165 + ? "Dropbox" 166 + : data?.parentDirectory?.name} 168 167 </Link> 169 168 } 170 169 </Breadcrumbs> ··· 173 172 marginBottom={"25px"} 174 173 className="!text-[var(--color-text)]" 175 174 > 176 - {data?.parentDirectory?.path === "/Music" 175 + {data?.directory?.path === "/Music" 177 176 ? "Dropbox" 178 - : data?.parentDirectory?.name} 177 + : data?.directory?.name} 179 178 </HeadingMedium> 180 179 </div> 181 180
+7 -8
apps/web/src/pages/googledrive/GoogleDrive.tsx
··· 19 19 20 20 const GoogleDrive = (props: GoogleDriveProps) => { 21 21 const { data, isLoading } = useFilesQuery(props.fileId); 22 - const { data: parent } = useFilesQuery(data?.parentDirectory?.fileId); 23 22 24 23 const columns = [ 25 24 columnHelper.accessor("name", { ··· 150 149 { 151 150 <Link 152 151 to={ 153 - parent?.parentDirectory?.path === "/Music" 152 + data?.parentDirectory?.path === "/Music" 154 153 ? `/googledrive` 155 154 : `/googledrive/$id` 156 155 } 157 - params={{ id: parent?.parentDirectory?.fileId || "" }} 156 + params={{ id: data?.parentDirectory?.fileId || "" }} 158 157 className="!text-[var(--color-text)]" 159 158 > 160 - {parent?.parentDirectory?.path === "/Music" 161 - ? "" 162 - : parent?.parentDirectory?.name} 159 + {data?.parentDirectory?.path === "/Music" 160 + ? "Google Drive" 161 + : data?.parentDirectory?.name} 163 162 </Link> 164 163 } 165 164 </Breadcrumbs> ··· 168 167 marginBottom={"25px"} 169 168 className="!text-[var(--color-text)]" 170 169 > 171 - {data?.parentDirectory?.path === "/Music" 170 + {data?.directory?.path === "/Music" 172 171 ? "Google Drive" 173 - : data?.parentDirectory?.name} 172 + : data?.directory?.name} 174 173 </HeadingMedium> 175 174 </div> 176 175