1
0
Fork 0
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:
François Darveau 2023-08-03 23:24:56 -04:00 committed by GitHub
parent edc3e6c330
commit 9e19af7d4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 650 additions and 459 deletions

View file

@ -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);

View file

@ -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

View file

@ -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 {

View file

@ -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();

View file

@ -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);

View file

@ -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 {

View file

@ -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 {