Refactor: removed default exports.

This commit is contained in:
Mike Cao 2025-02-13 22:53:25 -08:00
parent cd944e14ce
commit f83a12d6cd
343 changed files with 555 additions and 1046 deletions

View file

@ -5,7 +5,7 @@ import { getColor, getPastel } from '@/lib/colors';
const lib = lorelei;
function Avatar({ seed, size = 128, ...props }: { seed: string; size?: number }) {
export function Avatar({ seed, size = 128, ...props }: { seed: string; size?: number }) {
const backgroundColor = getPastel(getColor(seed), 4);
const avatar = useMemo(() => {
@ -19,5 +19,3 @@ function Avatar({ seed, size = 128, ...props }: { seed: string; size?: number })
return <img src={avatar} alt="Avatar" style={{ borderRadius: '100%' }} />;
}
export default Avatar;

View file

@ -34,5 +34,3 @@ export function Breadcrumb({ data }: BreadcrumbProps) {
</Flexbox>
);
}
export default Breadcrumb;

View file

@ -35,5 +35,3 @@ export function ConfirmationForm({
</Form>
);
}
export default ConfirmationForm;

View file

@ -2,8 +2,8 @@ import { ReactNode } from 'react';
import classNames from 'classnames';
import { Loading, SearchField } from 'react-basics';
import { useMessages, useNavigation } from '@/components/hooks';
import Empty from '@/components/common/Empty';
import Pager from '@/components/common/Pager';
import { Empty } from '@/components/common/Empty';
import { Pager } from '@/components/common/Pager';
import { PagedQueryResult } from '@/lib/types';
import styles from './DataTable.module.css';
import { LoadingPanel } from '@/components/common/LoadingPanel';
@ -87,5 +87,3 @@ export function DataTable({
</>
);
}
export default DataTable;

View file

@ -16,5 +16,3 @@ export function Empty({ message, className }: EmptyProps) {
</div>
);
}
export default Empty;

View file

@ -18,5 +18,3 @@ export function EmptyPlaceholder({ message, children }: EmptyPlaceholderProps) {
</Flexbox>
);
}
export default EmptyPlaceholder;

View file

@ -29,5 +29,3 @@ export function ErrorBoundary({ children }: { children: ReactNode }) {
</Boundary>
);
}
export default ErrorBoundary;

View file

@ -14,5 +14,3 @@ export function ErrorMessage() {
</div>
);
}
export default ErrorMessage;

View file

@ -17,5 +17,3 @@ export function Favicon({ domain, ...props }) {
return hostName ? <img src={src} width={16} height={16} alt="" {...props} /> : null;
}
export default Favicon;

View file

@ -16,5 +16,3 @@ export function FilterButtons({ items, selectedKey, onSelect }: FilterButtonsPro
</Flexbox>
);
}
export default FilterButtons;

View file

@ -51,5 +51,3 @@ export function FilterLink({
</div>
);
}
export default FilterLink;

View file

@ -1,6 +1,6 @@
import { Button, Icon, Icons } from 'react-basics';
import { useState } from 'react';
import MobileMenu from './MobileMenu';
import { MobileMenu } from './MobileMenu';
export function HamburgerButton({ menuItems }: { menuItems: any[] }) {
const [active, setActive] = useState(false);
@ -17,5 +17,3 @@ export function HamburgerButton({ menuItems }: { menuItems: any[] }) {
</>
);
}
export default HamburgerButton;

View file

@ -23,5 +23,3 @@ export function HoverTooltip({ children }: { children: ReactNode }) {
</Tooltip>
);
}
export default HoverTooltip;

View file

@ -2,6 +2,7 @@ import { ReactNode } from 'react';
import classNames from 'classnames';
import Link from 'next/link';
import { useLocale } from '@/components/hooks';
// eslint-disable-next-line css-modules/no-unused-class
import styles from './LinkButton.module.css';
export interface LinkButtonProps {
@ -26,5 +27,3 @@ export function LinkButton({ href, className, variant, scroll = true, children }
</Link>
);
}
export default LinkButton;

View file

@ -1,8 +1,8 @@
import { ReactNode } from 'react';
import classNames from 'classnames';
import { Loading } from 'react-basics';
import ErrorMessage from '@/components/common/ErrorMessage';
import Empty from '@/components/common/Empty';
import { ErrorMessage } from '@/components/common/ErrorMessage';
import { Empty } from '@/components/common/Empty';
import styles from './LoadingPanel.module.css';
export function LoadingPanel({

View file

@ -43,5 +43,3 @@ export function MobileMenu({
document.body,
);
}
export default MobileMenu;

View file

@ -55,5 +55,3 @@ export function Pager({ page, pageSize, count, onPageChange, className }: PagerP
</div>
);
}
export default Pager;

View file

@ -51,5 +51,3 @@ export function TypeConfirmationForm({
</Form>
);
}
export default TypeConfirmationForm;

View file

@ -26,5 +26,3 @@ export function TypeIcon({
</>
);
}
export default TypeIcon;