refactor: move clientUtils into utils/

This commit is contained in:
diced 2022-09-30 19:25:00 -07:00
parent 9f0697dd34
commit 8044b7f623
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
7 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,7 @@
import { Button, Card, Group, LoadingOverlay, Modal, Stack, Text, Title, Tooltip } from '@mantine/core';
import { useClipboard } from '@mantine/hooks';
import { showNotification } from '@mantine/notifications';
import { relativeTime } from 'lib/clientUtils';
import { relativeTime } from 'lib/utils/client';
import { useFileDelete, useFileFavorite } from 'lib/queries/files';
import { useState } from 'react';
import { CalendarIcon, ClockIcon, CopyIcon, CrossIcon, DeleteIcon, FileIcon, HashIcon, ImageIcon, StarIcon } from './icons';

View file

@ -1,7 +1,7 @@
import { SimpleGrid } from '@mantine/core';
import { FileIcon } from 'components/icons';
import StatCard from 'components/StatCard';
import { percentChange } from 'lib/clientUtils';
import { percentChange } from 'lib/utils/client';
import { useStats } from 'lib/queries/stats';
import { Database, Eye, Users } from 'react-feather';

View file

@ -9,7 +9,7 @@ import Link from 'components/Link';
import MutedText from 'components/MutedText';
import { SmallTable } from 'components/SmallTable';
import useFetch from 'hooks/useFetch';
import { bytesToRead } from 'lib/clientUtils';
import { bytesToRead } from 'lib/utils/client';
import { updateUser } from 'lib/redux/reducers/user';
import { useStoreDispatch, useStoreSelector } from 'lib/redux/store';
import { useEffect, useState } from 'react';

View file

@ -2,7 +2,7 @@ import { Box, Card, Grid, LoadingOverlay, MantineTheme, Title, useMantineTheme }
import { ArcElement, CategoryScale, Chart as ChartJS, ChartData, ChartOptions, LinearScale, LineController, LineElement, PointElement, Tooltip } from 'chart.js';
import ChartDataLabels from 'chartjs-plugin-datalabels';
import ColorHash from 'color-hash';
import { bytesToRead } from 'lib/clientUtils';
import { bytesToRead } from 'lib/utils/client';
import { useStats } from 'lib/queries/stats';
import { useMemo } from 'react';
import { Chart, Pie } from 'react-chartjs-2';

View file

@ -4,7 +4,7 @@ import { GetServerSideProps } from 'next';
import { Box, Button, Modal, PasswordInput } from '@mantine/core';
import config from 'lib/config';
import prisma from 'lib/prisma';
import { parse } from 'lib/clientUtils';
import { parse } from 'lib/utils/clientUtils';
import exts from 'lib/exts';
export default function EmbeddedImage({ image, user, pass }) {

View file

@ -9,7 +9,7 @@ import { format as formatDate } from 'fecha';
import datasource from 'lib/datasource';
import { randomUUID } from 'crypto';
import sharp from 'sharp';
import { humanTime, parseExpiry } from 'lib/clientUtils';
import { humanTime, parseExpiry } from 'lib/utils/clientUtils';
import { StringValue } from 'ms';
import { sendUpload } from 'lib/discord';