fix: remove filetype from file list

This commit is contained in:
Elias Schneider
2022-10-10 18:05:54 +02:00
parent 603d79c09d
commit 68ce8af197
5 changed files with 4 additions and 47 deletions

View File

@@ -35,18 +35,6 @@ const FileList = ({
const rows = files.map((file) => (
<tr key={file.name}>
<td>
{/* <Image
width={30}
height={30}
alt={file.name}
objectFit="cover"
style={{ borderRadius: 3 }}
src={`data:image/png;base64,${new Buffer(file.preview).toString(
"base64"
)}`}
></Image> */}
</td>
<td>{file.name}</td>
<td>{byteStringToHumanSizeString(file.size)}</td>
<td>
@@ -74,7 +62,6 @@ const FileList = ({
<Table>
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Size</th>
<th></th>

View File

@@ -19,7 +19,6 @@ const FileList = ({
const rows = files.map((file, i) => (
<tr key={i}>
<td>{file.name}</td>
<td>{file.type}</td>
<td>{byteStringToHumanSizeString(file.size.toString())}</td>
<td>
{file.uploadingState ? (
@@ -47,7 +46,6 @@ const FileList = ({
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Size</th>
<th></th>
</tr>

View File

@@ -1,6 +1,5 @@
import axios, { AxiosError } from "axios";
import { getCookie } from "cookies-next";
import toast from "../utils/toast.util";
const api = axios.create({
baseURL: "/api",
@@ -18,19 +17,4 @@ api.interceptors.request.use(
return Promise.reject(error);
}
);
api.interceptors.response.use(
(response) => {
return response;
},
(error: AxiosError) => {
const status = error.response?.status;
if (status == 400) {
toast.error(error.response?.data?.message ?? "An unkown error occured");
}
return Promise.reject(error);
}
);
export default api;