mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-27 14:59:37 +02:00
Added auth headers to api requests
This commit is contained in:
parent
0d36c5cf94
commit
d94a6cea5a
12 changed files with 135 additions and 56 deletions
|
@ -29,7 +29,10 @@ interface Props {
|
|||
}
|
||||
|
||||
export const Apps = (props: Props): JSX.Element => {
|
||||
const { apps, loading } = useSelector((state: State) => state.apps);
|
||||
const {
|
||||
apps: { apps, loading },
|
||||
auth: { isAuthenticated },
|
||||
} = useSelector((state: State) => state);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const { getApps } = bindActionCreators(actionCreators, dispatch);
|
||||
|
@ -76,10 +79,12 @@ export const Apps = (props: Props): JSX.Element => {
|
|||
subtitle={<Link to="/">Go back</Link>}
|
||||
/>
|
||||
|
||||
<div className={classes.ActionsContainer}>
|
||||
<ActionButton name="Add" icon="mdiPlusBox" handler={toggleModal} />
|
||||
<ActionButton name="Edit" icon="mdiPencil" handler={toggleEdit} />
|
||||
</div>
|
||||
{isAuthenticated && (
|
||||
<div className={classes.ActionsContainer}>
|
||||
<ActionButton name="Add" icon="mdiPlusBox" handler={toggleModal} />
|
||||
<ActionButton name="Edit" icon="mdiPencil" handler={toggleEdit} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className={classes.Apps}>
|
||||
{loading ? (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue