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