chore: remove cn non-default exports

This commit is contained in:
Aarnav Tale 2025-01-28 17:46:16 -05:00
parent 843cfc4d4f
commit c9d8052e39
No known key found for this signature in database
35 changed files with 62 additions and 76 deletions

View file

@ -1,10 +1,10 @@
import { useSubmit } from 'react-router';
import { Button } from 'react-aria-components';
import { useSubmit } from 'react-router';
import Code from '~/components/Code';
import Link from '~/components/Link';
import TableList from '~/components/TableList';
import { cn } from '~/utils/cn';
import cn from '~/utils/cn';
import AddDNS from '../dialogs/dns';
@ -37,7 +37,7 @@ export default function DNS({ records, isDisabled }: Props) {
</TableList.Item>
) : (
records.map((record, index) => (
<TableList.Item key={index}>
<TableList.Item key={`${record.name}-${record.value}`}>
<div className="flex gap-24">
<div className="flex gap-2">
<p className="font-mono text-sm font-bold">{record.type}</p>

View file

@ -18,7 +18,7 @@ import { type FetcherWithComponents, useFetcher } from 'react-router';
import Spinner from '~/components/Spinner';
import TableList from '~/components/TableList';
import { cn } from '~/utils/cn';
import cn from '~/utils/cn';
type Properties = {
readonly baseDomain?: string;

View file

@ -1,11 +1,8 @@
import { useSubmit } from 'react-router';
import { useState } from 'react';
import { Button } from 'react-aria-components';
import { useSubmit } from 'react-router';
import Link from '~/components/Link';
import Switch from '~/components/Switch';
import TableList from '~/components/TableList';
import { cn } from '~/utils/cn';
import cn from '~/utils/cn';
import AddNameserver from '../dialogs/nameserver';
@ -59,7 +56,7 @@ function NameserverList({
name,
}: ListProps) {
const submit = useSubmit();
const list = isGlobal ? nameservers['global'] : nameservers[name];
const list = isGlobal ? nameservers.global : nameservers[name];
if (list.length === 0) {
return null;
}
@ -74,8 +71,7 @@ function NameserverList({
<TableList>
{list.length > 0
? list.map((ns, index) => (
// eslint-disable-next-line react/no-array-index-key
<TableList.Item key={index}>
<TableList.Item key={ns}>
<p className="font-mono text-sm">{ns}</p>
<Button
className={cn(

View file

@ -5,7 +5,7 @@ import Code from '~/components/Code';
import Dialog from '~/components/Dialog';
import Input from '~/components/Input';
import Spinner from '~/components/Spinner';
import { cn } from '~/utils/cn';
import cn from '~/utils/cn';
type Properties = {
readonly name: string;

View file

@ -6,7 +6,7 @@ import Dialog from '~/components/Dialog';
import Input from '~/components/Input';
import Switch from '~/components/Switch';
import Tooltip from '~/components/Tooltip';
import { cn } from '~/utils/cn';
import cn from '~/utils/cn';
interface Props {
nameservers: Record<string, string[]>;