rename files and set max client width on viewport

This commit is contained in:
geoffrey45
2022-06-16 15:24:56 +03:00
parent 92e2420174
commit 1cc7c933b7
13 changed files with 24 additions and 27 deletions
+30
View File
@@ -0,0 +1,30 @@
import { Folder, Track } from "@/interfaces";
import state from "../state";
import useAxios from "../useAxios";
export default async function (path: string) {
interface FolderData {
tracks: Track[];
folders: Folder[];
}
const { data, error } = await useAxios({
url: `${state.settings.uri}/folder`,
props: {
folder: path,
},
});
if (error) {
console.error(error);
}
if (data) {
return data as FolderData;
}
return <FolderData>{
tracks: [],
folders: [],
};
}