Replace classnames package with clsx

This commit is contained in:
Alejandro Celaya
2023-11-01 09:41:21 +01:00
parent 060dcc8500
commit 98b2db99b3
8 changed files with 27 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
import classNames from 'classnames';
import { clsx } from 'clsx';
import { useMemo } from 'react';
import { useLocation } from 'react-router-dom';
import type { SelectedServer } from '../servers/data';
@@ -15,7 +15,7 @@ export const ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContai
const { pathname } = useLocation();
const withPadding = useMemo(() => SHLINK_CONTAINER_PATH_PATTERN.test(pathname), [pathname]);
const classes = classNames('text-center', {
const classes = clsx('text-center', {
'shlink-versions-container--with-sidebar': withPadding,
});