mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
Refactor: removed default exports.
This commit is contained in:
parent
cd944e14ce
commit
f83a12d6cd
343 changed files with 555 additions and 1046 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -34,5 +34,3 @@ export function Breadcrumb({ data }: BreadcrumbProps) {
|
|||
</Flexbox>
|
||||
);
|
||||
}
|
||||
|
||||
export default Breadcrumb;
|
||||
|
|
|
|||
|
|
@ -35,5 +35,3 @@ export function ConfirmationForm({
|
|||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
export default ConfirmationForm;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -16,5 +16,3 @@ export function Empty({ message, className }: EmptyProps) {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Empty;
|
||||
|
|
|
|||
|
|
@ -18,5 +18,3 @@ export function EmptyPlaceholder({ message, children }: EmptyPlaceholderProps) {
|
|||
</Flexbox>
|
||||
);
|
||||
}
|
||||
|
||||
export default EmptyPlaceholder;
|
||||
|
|
|
|||
|
|
@ -29,5 +29,3 @@ export function ErrorBoundary({ children }: { children: ReactNode }) {
|
|||
</Boundary>
|
||||
);
|
||||
}
|
||||
|
||||
export default ErrorBoundary;
|
||||
|
|
|
|||
|
|
@ -14,5 +14,3 @@ export function ErrorMessage() {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ErrorMessage;
|
||||
|
|
|
|||
|
|
@ -17,5 +17,3 @@ export function Favicon({ domain, ...props }) {
|
|||
|
||||
return hostName ? <img src={src} width={16} height={16} alt="" {...props} /> : null;
|
||||
}
|
||||
|
||||
export default Favicon;
|
||||
|
|
|
|||
|
|
@ -16,5 +16,3 @@ export function FilterButtons({ items, selectedKey, onSelect }: FilterButtonsPro
|
|||
</Flexbox>
|
||||
);
|
||||
}
|
||||
|
||||
export default FilterButtons;
|
||||
|
|
|
|||
|
|
@ -51,5 +51,3 @@ export function FilterLink({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default FilterLink;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -23,5 +23,3 @@ export function HoverTooltip({ children }: { children: ReactNode }) {
|
|||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
export default HoverTooltip;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -43,5 +43,3 @@ export function MobileMenu({
|
|||
document.body,
|
||||
);
|
||||
}
|
||||
|
||||
export default MobileMenu;
|
||||
|
|
|
|||
|
|
@ -55,5 +55,3 @@ export function Pager({ page, pageSize, count, onPageChange, className }: PagerP
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Pager;
|
||||
|
|
|
|||
|
|
@ -51,5 +51,3 @@ export function TypeConfirmationForm({
|
|||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
export default TypeConfirmationForm;
|
||||
|
|
|
|||
|
|
@ -26,5 +26,3 @@ export function TypeIcon({
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default TypeIcon;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue