update user files info
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { PieChart, Pie, Cell, ResponsiveContainer } from 'recharts';
|
||||
|
||||
export const PieChartComponent = ({ data }: {
|
||||
export const PieChartComponent = ({ data, show }: {
|
||||
data: {
|
||||
name: string,
|
||||
value: number,
|
||||
color: string
|
||||
}[]
|
||||
}[],
|
||||
show: number | string
|
||||
}) => {
|
||||
const t = useTranslations('Global');
|
||||
|
||||
@@ -19,7 +20,7 @@ export const PieChartComponent = ({ data }: {
|
||||
<ResponsiveContainer width={200} height={200}>
|
||||
<PieChart>
|
||||
<text x={100} y={75} className="pie-char-text">
|
||||
0
|
||||
{show}
|
||||
</text>
|
||||
<text x={100} y={100} className="pie-char-text">
|
||||
{t('out-of')}
|
||||
|
||||
@@ -294,6 +294,7 @@ export default function UploadSectionFile({ fileType, allowedExtensions, maxFile
|
||||
if (chunkStatus.message_body.missing_chunks === 0) {
|
||||
setIsFileUploaded(true);
|
||||
await queryClient.invalidateQueries({ queryKey: ['userFilesData'] });
|
||||
await queryClient.invalidateQueries({ queryKey: ['userFilesInfo'] });
|
||||
} else {
|
||||
throw new Error('Not all chunks were uploaded');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user