-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgreetDao.js
More file actions
70 lines (66 loc) · 2.14 KB
/
greetDao.js
File metadata and controls
70 lines (66 loc) · 2.14 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { connect } from "react-redux";
import Link from "next/link";
function GreetDao({ dao, ...props }) {
let isDaoTemp = new RegExp(/^temp-/);
return (
<div>
{isDaoTemp.test(dao.name) ? (
<div>
<div className="sm:flex bg-box-grad-tl bg-base-200 px-4 py-8 justify-between items-center rounded-md">
<div className="flex">
<div
className={
"w-14 h-14 flex-none mr-5 sm:mr-10 flex justify-center items-center rounded-full border border-accent bg-accent"
}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className="w-6 h-6"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"
/>
</svg>
</div>
<div className="flex-1 mr-8">
<div className="text-lg">Update your DAO</div>
<div className="text-xs mt-2 text-type-secondary">
This DAO profile has been migrated, please update the name
{" (remove temp-)"}
</div>
</div>
</div>
<div className="flex-none w-60 mr-8 mt-4 sm:mt-0">
<Link
href={"/" + dao.address}
className="btn btn-accent btn-block btn-sm"
>
Update DAO Name
</Link>
</div>
</div>
</div>
) : (
<div>
<div className="text-xs uppercase">Welcome to</div>
<Link href={"/" + dao.name} className="text-lg btn-link">
{dao.name}
</Link>
</div>
)}
</div>
);
}
const mapStateToProps = (state) => {
return {
selectedAddress: state.wallet.selectedAddress,
user: state.user,
};
};
export default connect(mapStateToProps, {})(GreetDao);