mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-25 22:09:36 +02:00
update to latest react version and update client dependencies (#23)
This commit is contained in:
parent
edc3e6c330
commit
9e19af7d4c
30 changed files with 650 additions and 459 deletions
|
@ -17,10 +17,8 @@ interface Props {
|
|||
export const AppCard = (props: Props): JSX.Element => {
|
||||
const { category, fromHomepage = false } = props;
|
||||
|
||||
const {
|
||||
config: { config },
|
||||
auth: { isAuthenticated },
|
||||
} = useSelector((state: State) => state);
|
||||
const config = useSelector((state: State) => state.config.config);
|
||||
const isAuthenticated = useSelector((state: State) => state.auth.isAuthenticated);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const { setEditCategory } = bindActionCreators(actionCreators, dispatch);
|
||||
|
|
|
@ -22,9 +22,7 @@ export const AppGrid = (props: Props): JSX.Element => {
|
|||
fromHomepage = false,
|
||||
} = props;
|
||||
|
||||
const {
|
||||
config: { config }
|
||||
} = useSelector((state: State) => state);
|
||||
const config = useSelector((state: State) => state.config.config);
|
||||
|
||||
const shouldBeShown = (category: Category) => {
|
||||
return !config.hideEmptyCategories || category.apps.length > 0 || !fromHomepage
|
||||
|
|
|
@ -18,10 +18,8 @@ interface Props {
|
|||
}
|
||||
|
||||
export const AppsTable = ({ openFormForUpdating }: Props): JSX.Element => {
|
||||
const {
|
||||
apps: { categoryInEdit },
|
||||
config: { config },
|
||||
} = useSelector((state: State) => state);
|
||||
const categoryInEdit = useSelector((state: State) => state.apps.categoryInEdit);
|
||||
const config = useSelector((state: State) => state.config.config);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const {
|
||||
|
|
|
@ -23,10 +23,10 @@ export enum ContentType {
|
|||
|
||||
export const Apps = (props: Props): JSX.Element => {
|
||||
// Get Redux state
|
||||
const {
|
||||
apps: { loading, categories, categoryInEdit },
|
||||
auth: { isAuthenticated },
|
||||
} = useSelector((state: State) => state);
|
||||
const categories = useSelector((state: State) => state.apps.categories);
|
||||
const loading = useSelector((state: State) => state.apps.loading);
|
||||
const categoryInEdit = useSelector((state: State) => state.apps.categoryInEdit);
|
||||
const isAuthenticated = useSelector((state: State) => state.auth.isAuthenticated);
|
||||
|
||||
// Get Redux action creators
|
||||
const dispatch = useDispatch();
|
||||
|
|
|
@ -26,7 +26,7 @@ export const AppsForm = ({
|
|||
const { categories } = useSelector((state: State) => state.apps);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const { addApp, updateApp, setEditApp, createNotification } =
|
||||
const { addApp, updateApp, createNotification } =
|
||||
bindActionCreators(actionCreators, dispatch);
|
||||
|
||||
const [useCustomIcon, toggleUseCustomIcon] = useState<boolean>(false);
|
||||
|
|
|
@ -18,10 +18,8 @@ interface Props {
|
|||
}
|
||||
|
||||
export const AppsTable = ({ openFormForUpdating }: Props): JSX.Element => {
|
||||
const {
|
||||
apps: { categoryInEdit },
|
||||
config: { config },
|
||||
} = useSelector((state: State) => state);
|
||||
const categoryInEdit = useSelector((state: State) => state.apps.categoryInEdit);
|
||||
const config = useSelector((state: State) => state.config.config);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const {
|
||||
|
|
|
@ -18,10 +18,8 @@ interface Props {
|
|||
}
|
||||
|
||||
export const CategoryTable = ({ openFormForUpdating }: Props): JSX.Element => {
|
||||
const {
|
||||
config: { config },
|
||||
apps: { categories },
|
||||
} = useSelector((state: State) => state);
|
||||
const categories = useSelector((state: State) => state.apps.categories);
|
||||
const config = useSelector((state: State) => state.config.config);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue