mirror of https://github.com/buster-so/buster.git
move helpers out of app folder
This commit is contained in:
parent
d01b28ffeb
commit
b057d80828
|
@ -1,6 +1,6 @@
|
|||
import React, { useLayoutEffect, useMemo, useRef } from 'react';
|
||||
import { Modal, Button, Divider, Input, InputRef } from 'antd';
|
||||
import { AppMaterialIcons, AppSegmented, Text } from '@/components';
|
||||
import { AppMaterialIcons, AppSegmented, asset_typeToIcon, Text } from '@/components';
|
||||
import { BusterList, BusterListColumn, BusterListRow } from '@/components/list';
|
||||
import { useMemoizedFn, useThrottleFn } from 'ahooks';
|
||||
import { boldHighlights, formatDate } from '@/utils';
|
||||
|
@ -9,7 +9,6 @@ import {
|
|||
type BusterSearchResult,
|
||||
ShareAssetType
|
||||
} from '@/api/asset_interfaces';
|
||||
import { asset_typeToIcon } from '@/app/app/_helpers';
|
||||
import { CircleSpinnerLoaderContainer } from '@/components/loaders';
|
||||
import { BusterCollection } from '@/api/asset_interfaces';
|
||||
import { useBusterSearchContextSelector } from '@/context/Search';
|
||||
|
@ -76,7 +75,7 @@ export const AddTypeModal: React.FC<{
|
|||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
render: (_, record: BusterSearchResult) => {
|
||||
const { name, updated_at, type, highlights } = record;
|
||||
const { name, type, highlights } = record;
|
||||
const icon = asset_typeToIcon(type, {
|
||||
size: 17
|
||||
});
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
export * from './listHelpers';
|
|
@ -0,0 +1 @@
|
|||
export * from './listIconHelpers';
|
|
@ -1,5 +1,5 @@
|
|||
import { ShareAssetType } from '@/api/asset_interfaces';
|
||||
import { AppMaterialIcons } from '@/components/icons';
|
||||
import {AppMaterialIcons} from '../AppMaterialIcons'
|
||||
|
||||
const iconRecord: Record<ShareAssetType, string> = {
|
||||
[ShareAssetType.COLLECTION]: 'note_stack',
|
|
@ -1 +1,2 @@
|
|||
export * from './AppMaterialIcons';
|
||||
export * from './helpers';
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { ShareAssetType } from '@/api/asset_interfaces';
|
||||
import { asset_typeToTranslation } from '@/app/app/_helpers';
|
||||
import { BusterLogo } from '@/assets/svg/BusterLogo';
|
||||
import { asset_typeToTranslation } from '@/components/icons';
|
||||
import { Title } from '@/components/text';
|
||||
import { useBusterNotifications } from '@/context/BusterNotifications';
|
||||
import { BusterRoutes, createBusterRoute } from '@/routes';
|
||||
import { Button } from 'antd';
|
||||
import Link from 'next/link';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
export const AppNoPageAccess: React.FC<{
|
||||
asset_type: ShareAssetType;
|
||||
metricId?: string;
|
||||
dashboardId?: string;
|
||||
}> = React.memo(({ asset_type, metricId, dashboardId }) => {
|
||||
}> = React.memo(({ asset_type }) => {
|
||||
const { openInfoMessage } = useBusterNotifications();
|
||||
|
||||
return (
|
||||
|
|
|
@ -8,8 +8,8 @@ import Link from 'next/link';
|
|||
import { useParams } from 'next/navigation';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { asset_typeToIcon } from '@/app/app/_helpers';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { asset_typeToIcon } from '@/components/icons';
|
||||
|
||||
export const FavoritesDropdown: React.FC<{}> = React.memo(() => {
|
||||
const userFavorites = useUserConfigContextSelector((state) => state.userFavorites);
|
||||
|
|
Loading…
Reference in New Issue