forked from onflow/kitty-items
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmint.jsx
More file actions
34 lines (30 loc) · 826 Bytes
/
mint.jsx
File metadata and controls
34 lines (30 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import AdminNav from "src/components/AdminNav"
import Minter from "src/components/Minter"
import PageTitle from "src/components/PageTitle"
import useAppContext from "src/hooks/useAppContext"
export default function Mint() {
const {isLoggedInAsAdmin, setShowAdminLoginDialog} = useAppContext()
const onAdminLoginClick = () => {
setShowAdminLoginDialog(true)
}
if (!isLoggedInAsAdmin) {
return (
<div className="flex items-center justify-center mt-14">
<button onClick={onAdminLoginClick} data-cy="btn-log-in-admin">
Log In to Admin View
</button>
</div>
)
}
return (
<div>
<PageTitle>Mint</PageTitle>
<main>
<div className="main-container py-14">
<AdminNav />
<Minter />
</div>
</main>
</div>
)
}