mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 04:25:39 +01:00
refactor: remove svgr
This commit is contained in:
parent
910f165103
commit
b37f39fbb4
89 changed files with 5614 additions and 6397 deletions
|
|
@ -21,8 +21,8 @@ import useLocale from 'hooks/useLocale';
|
|||
import { dateFormat } from 'lib/date';
|
||||
import { chunk } from 'lib/array';
|
||||
import { getDateLocale } from 'lib/lang';
|
||||
import Chevron from 'assets/chevron-down.svg';
|
||||
import Cross from 'assets/times.svg';
|
||||
import Chevron from 'assets/chevron-down';
|
||||
import Cross from 'assets/times';
|
||||
import styles from './Calendar.module.css';
|
||||
import Icon from './Icon';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Icon from 'components/common/Icon';
|
||||
import Check from 'assets/check.svg';
|
||||
import Check from 'assets/check';
|
||||
import styles from './Checkbox.module.css';
|
||||
|
||||
function Checkbox({ name, value, label, onChange }) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import DropDown from './DropDown';
|
|||
import DatePickerForm from 'components/forms/DatePickerForm';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import { dateFormat } from 'lib/date';
|
||||
import Calendar from 'assets/calendar-alt.svg';
|
||||
import Calendar from 'assets/calendar-alt';
|
||||
import Icon from './Icon';
|
||||
|
||||
export const filterOptions = [
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||
import classNames from 'classnames';
|
||||
import Menu from './Menu';
|
||||
import useDocumentClick from 'hooks/useDocumentClick';
|
||||
import Chevron from 'assets/chevron-down.svg';
|
||||
import Chevron from 'assets/chevron-down';
|
||||
import styles from './Dropdown.module.css';
|
||||
import Icon from './Icon';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Icon from 'components/common/Icon';
|
||||
import Logo from 'assets/logo.svg';
|
||||
import Logo from 'assets/logo';
|
||||
import styles from './EmptyPlaceholder.module.css';
|
||||
|
||||
function EmptyPlaceholder({ msg, children }) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import Icon from './Icon';
|
||||
import Exclamation from 'assets/exclamation-triangle.svg';
|
||||
import Exclamation from 'assets/exclamation-triangle';
|
||||
import styles from './ErrorMessage.module.css';
|
||||
|
||||
export default function ErrorMessage() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import classNames from 'classnames';
|
|||
import usePageQuery from 'hooks/usePageQuery';
|
||||
import { safeDecodeURI } from 'lib/url';
|
||||
import Icon from './Icon';
|
||||
import External from 'assets/arrow-up-right-from-square.svg';
|
||||
import External from 'assets/arrow-up-right-from-square';
|
||||
import styles from './FilterLink.module.css';
|
||||
|
||||
export default function FilterLink({ id, value, label, externalUrl }) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Button from 'components/common/Button';
|
||||
import XMark from 'assets/xmark.svg';
|
||||
import Bars from 'assets/bars.svg';
|
||||
import XMark from 'assets/xmark';
|
||||
import Bars from 'assets/bars';
|
||||
import { useState } from 'react';
|
||||
import styles from './HamburgerButton.module.css';
|
||||
import MobileMenu from './MobileMenu';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import classNames from 'classnames';
|
||||
import Link from './Link';
|
||||
import Button from './Button';
|
||||
import XMark from 'assets/xmark.svg';
|
||||
import XMark from 'assets/xmark';
|
||||
import styles from './MobileMenu.module.css';
|
||||
|
||||
export default function MobileMenu({ items = [], onClose }) {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { FormattedMessage } from 'react-intl';
|
|||
import useStore from 'store/queries';
|
||||
import { setDateRange } from 'store/websites';
|
||||
import Button from './Button';
|
||||
import Refresh from 'assets/redo.svg';
|
||||
import Dots from 'assets/ellipsis-h.svg';
|
||||
import Refresh from 'assets/redo';
|
||||
import Dots from 'assets/ellipsis-h';
|
||||
import useDateRange from 'hooks/useDateRange';
|
||||
|
||||
function RefreshButton({ websiteId }) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||
import ReactDOM from 'react-dom';
|
||||
import { useSpring, animated } from 'react-spring';
|
||||
import Icon from 'components/common/Icon';
|
||||
import Close from 'assets/times.svg';
|
||||
import Close from 'assets/times';
|
||||
import styles from './Toast.module.css';
|
||||
|
||||
function Toast({ message, timeout = 3000, onClose }) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import useApi from 'hooks/useApi';
|
|||
import { setItem } from 'lib/web';
|
||||
import { AUTH_TOKEN } from 'lib/constants';
|
||||
import { setUser } from 'store/app';
|
||||
import Logo from 'assets/logo.svg';
|
||||
import Logo from 'assets/logo';
|
||||
import styles from './LoginForm.module.css';
|
||||
|
||||
const validate = ({ username, password }) => {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import ThemeButton from 'components/settings/ThemeButton';
|
|||
import HamburgerButton from 'components/common/HamburgerButton';
|
||||
import UpdateNotice from 'components/common/UpdateNotice';
|
||||
import UserButton from 'components/settings/UserButton';
|
||||
import Logo from 'assets/logo.svg';
|
||||
import Logo from 'assets/logo';
|
||||
import styles from './Header.module.css';
|
||||
import useUser from 'hooks/useUser';
|
||||
import { HOMEPAGE_URL } from 'lib/constants';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import Button from 'components/common/Button';
|
||||
import Times from 'assets/times.svg';
|
||||
import Times from 'assets/times';
|
||||
import styles from './FilterTags.module.css';
|
||||
|
||||
export default function FilterTags({ params, onClick }) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import classNames from 'classnames';
|
|||
import Link from 'components/common/Link';
|
||||
import Loading from 'components/common/Loading';
|
||||
import useFetch from 'hooks/useFetch';
|
||||
import Arrow from 'assets/arrow-right.svg';
|
||||
import Arrow from 'assets/arrow-right';
|
||||
import { percentFilter } from 'lib/filters';
|
||||
import useDateRange from 'hooks/useDateRange';
|
||||
import usePageQuery from 'hooks/usePageQuery';
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import { getDeviceMessage, labels } from 'components/messages';
|
|||
import useLocale from 'hooks/useLocale';
|
||||
import useCountryNames from 'hooks/useCountryNames';
|
||||
import { BROWSERS } from 'lib/constants';
|
||||
import Bolt from 'assets/bolt.svg';
|
||||
import Visitor from 'assets/visitor.svg';
|
||||
import Eye from 'assets/eye.svg';
|
||||
import Bolt from 'assets/bolt';
|
||||
import Visitor from 'assets/visitor';
|
||||
import Eye from 'assets/eye';
|
||||
import { stringToColor } from 'lib/format';
|
||||
import { dateFormat } from 'lib/date';
|
||||
import styles from './RealtimeLog.module.css';
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import RefreshButton from 'components/common/RefreshButton';
|
|||
import ButtonLayout from 'components/layout/ButtonLayout';
|
||||
import Favicon from 'components/common/Favicon';
|
||||
import ActiveUsers from './ActiveUsers';
|
||||
import Arrow from 'assets/arrow-right.svg';
|
||||
import Arrow from 'assets/arrow-right';
|
||||
import styles from './WebsiteHeader.module.css';
|
||||
|
||||
export default function WebsiteHeader({ websiteId, title, domain, showLink = false }) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
|
|||
import Icon from 'components/common/Icon';
|
||||
import useFetch from 'hooks/useFetch';
|
||||
import useUser from 'hooks/useUser';
|
||||
import ChevronDown from 'assets/chevron-down.svg';
|
||||
import ChevronDown from 'assets/chevron-down';
|
||||
import styles from './TestConsole.module.css';
|
||||
|
||||
export default function TestConsole() {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import GridLayout, { GridRow, GridColumn } from 'components/layout/GridLayout';
|
|||
import MenuLayout from 'components/layout/MenuLayout';
|
||||
import Link from 'components/common/Link';
|
||||
import Loading from 'components/common/Loading';
|
||||
import Arrow from 'assets/arrow-right.svg';
|
||||
import Arrow from 'assets/arrow-right';
|
||||
import PagesTable from 'components/metrics/PagesTable';
|
||||
import ReferrersTable from 'components/metrics/ReferrersTable';
|
||||
import BrowsersTable from 'components/metrics/BrowsersTable';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import Link from 'components/common/Link';
|
|||
import WebsiteChart from 'components/metrics/WebsiteChart';
|
||||
import Page from 'components/layout/Page';
|
||||
import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
|
||||
import Arrow from 'assets/arrow-right.svg';
|
||||
import Arrow from 'assets/arrow-right';
|
||||
import styles from './WebsiteList.module.css';
|
||||
|
||||
export default function WebsiteList({ websites, showCharts, limit }) {
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ import AccountEditForm from 'components/forms/AccountEditForm';
|
|||
import ButtonLayout from 'components/layout/ButtonLayout';
|
||||
import DeleteForm from 'components/forms/DeleteForm';
|
||||
import useFetch from 'hooks/useFetch';
|
||||
import Pen from 'assets/pen.svg';
|
||||
import Plus from 'assets/plus.svg';
|
||||
import Trash from 'assets/trash.svg';
|
||||
import Check from 'assets/check.svg';
|
||||
import LinkIcon from 'assets/external-link.svg';
|
||||
import Pen from 'assets/pen';
|
||||
import Plus from 'assets/plus';
|
||||
import Trash from 'assets/trash';
|
||||
import Check from 'assets/check';
|
||||
import LinkIcon from 'assets/external-link';
|
||||
import styles from './AccountSettings.module.css';
|
||||
|
||||
export default function AccountSettings() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import MenuButton from 'components/common/MenuButton';
|
||||
import Gear from 'assets/gear.svg';
|
||||
import Gear from 'assets/gear';
|
||||
import useStore, { setDashboard, defaultDashboardConfig } from 'store/app';
|
||||
|
||||
const selector = state => state.dashboard;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { languages } from 'lib/lang';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import MenuButton from 'components/common/MenuButton';
|
||||
import Globe from 'assets/globe.svg';
|
||||
import Globe from 'assets/globe';
|
||||
import styles from './LanguageButton.module.css';
|
||||
|
||||
export default function LanguageButton() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Modal from 'components/common/Modal';
|
|||
import Toast from 'components/common/Toast';
|
||||
import ChangePasswordForm from 'components/forms/ChangePasswordForm';
|
||||
import TimezoneSetting from 'components/settings/TimezoneSetting';
|
||||
import Dots from 'assets/ellipsis-h.svg';
|
||||
import Dots from 'assets/ellipsis-h';
|
||||
import styles from './ProfileSettings.module.css';
|
||||
import DateRangeSetting from './DateRangeSetting';
|
||||
import useEscapeKey from 'hooks/useEscapeKey';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React from 'react';
|
||||
import { useTransition, animated } from 'react-spring';
|
||||
import useTheme from 'hooks/useTheme';
|
||||
import Sun from 'assets/sun.svg';
|
||||
import Moon from 'assets/moon.svg';
|
||||
import Sun from 'assets/sun';
|
||||
import Moon from 'assets/moon';
|
||||
import styles from './ThemeButton.module.css';
|
||||
import Icon from '../common/Icon';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import classNames from 'classnames';
|
||||
import Button from 'components/common/Button';
|
||||
import useTheme from 'hooks/useTheme';
|
||||
import Sun from 'assets/sun.svg';
|
||||
import Moon from 'assets/moon.svg';
|
||||
import Sun from 'assets/sun';
|
||||
import Moon from 'assets/moon';
|
||||
import styles from './ThemeSetting.module.css';
|
||||
|
||||
export default function ThemeSetting() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { FormattedMessage } from 'react-intl';
|
|||
import { useRouter } from 'next/router';
|
||||
import MenuButton from 'components/common/MenuButton';
|
||||
import Icon from 'components/common/Icon';
|
||||
import User from 'assets/user.svg';
|
||||
import User from 'assets/user';
|
||||
import styles from './UserButton.module.css';
|
||||
import { removeItem } from 'lib/web';
|
||||
import { AUTH_TOKEN } from 'lib/constants';
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
|
|||
import ButtonLayout from 'components/layout/ButtonLayout';
|
||||
import Toast from 'components/common/Toast';
|
||||
import Favicon from 'components/common/Favicon';
|
||||
import Pen from 'assets/pen.svg';
|
||||
import Trash from 'assets/trash.svg';
|
||||
import Reset from 'assets/redo.svg';
|
||||
import Plus from 'assets/plus.svg';
|
||||
import Code from 'assets/code.svg';
|
||||
import LinkIcon from 'assets/link.svg';
|
||||
import Pen from 'assets/pen';
|
||||
import Trash from 'assets/trash';
|
||||
import Reset from 'assets/redo';
|
||||
import Plus from 'assets/plus';
|
||||
import Code from 'assets/code';
|
||||
import LinkIcon from 'assets/link';
|
||||
import useFetch from 'hooks/useFetch';
|
||||
import useUser from 'hooks/useUser';
|
||||
import styles from './WebsiteSettings.module.css';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue