mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-28 07:09:36 +02:00
parent
74e3cbc7e2
commit
2530f2d089
5 changed files with 43 additions and 40 deletions
|
@ -1,5 +1,5 @@
|
|||
import { App, Category } from '../../../interfaces';
|
||||
import { iconParser, urlParser } from '../../../utility';
|
||||
import { iconParser, searchConfig, urlParser } from '../../../utility';
|
||||
import Icon from '../../UI/Icons/Icon/Icon';
|
||||
import classes from './AppCard.module.css';
|
||||
|
||||
|
@ -45,7 +45,7 @@ const AppCard = (props: ComponentProps): JSX.Element => {
|
|||
return (
|
||||
<a
|
||||
href={redirectUrl}
|
||||
target='_blank'
|
||||
target={searchConfig('appsSameTab', false) ? '' : '_blank'}
|
||||
rel='noreferrer'
|
||||
key={`app-${app.id}`}>
|
||||
<div className={classes.AppCardIcon}>{iconEl}</div>
|
||||
|
|
|
@ -25,7 +25,7 @@ interface ComponentProps {
|
|||
|
||||
export enum ContentType {
|
||||
category,
|
||||
app,
|
||||
app
|
||||
}
|
||||
|
||||
const Apps = (props: ComponentProps): JSX.Element => {
|
||||
|
@ -34,26 +34,24 @@ const Apps = (props: ComponentProps): JSX.Element => {
|
|||
const [modalIsOpen, setModalIsOpen] = useState(false);
|
||||
const [formContentType, setFormContentType] = useState(ContentType.category);
|
||||
const [isInEdit, setIsInEdit] = useState(false);
|
||||
const [tableContentType, setTableContentType] = useState(
|
||||
ContentType.category
|
||||
);
|
||||
const [tableContentType, setTableContentType] = useState(ContentType.category);
|
||||
const [isInUpdate, setIsInUpdate] = useState(false);
|
||||
const [categoryInUpdate, setCategoryInUpdate] = useState<Category>({
|
||||
name: "",
|
||||
name: '',
|
||||
id: -1,
|
||||
isPinned: false,
|
||||
orderId: 0,
|
||||
type: "apps",
|
||||
type: 'apps',
|
||||
apps: [],
|
||||
bookmarks: [],
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
});
|
||||
updatedAt: new Date()
|
||||
})
|
||||
const [appInUpdate, setAppInUpdate] = useState<App>({
|
||||
name: "string",
|
||||
url: "string",
|
||||
name: 'string',
|
||||
url: 'string',
|
||||
categoryId: -1,
|
||||
icon: "string",
|
||||
icon: 'string',
|
||||
isPinned: false,
|
||||
orderId: 0,
|
||||
id: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue