@oasisomniverse/nextjs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/package.json +29 -0
  2. package/src/components/ForgetPassword.tsx +127 -0
  3. package/src/components/Login.tsx +223 -0
  4. package/src/components/ResetPassword.tsx +177 -0
  5. package/src/components/Signup.tsx +286 -0
  6. package/src/components/VerifyEmail.tsx +69 -0
  7. package/src/components/common/AvatarConnect.tsx +90 -0
  8. package/src/components/common/Contact.tsx +61 -0
  9. package/src/components/common/Eggs.tsx +51 -0
  10. package/src/components/common/Game.tsx +37 -0
  11. package/src/components/common/HyperDrive.tsx +51 -0
  12. package/src/components/common/KarmaToast.tsx +39 -0
  13. package/src/components/common/Map.tsx +43 -0
  14. package/src/components/common/MenuMessage.tsx +71 -0
  15. package/src/components/common/Messaging.tsx +75 -0
  16. package/src/components/common/Mission.tsx +41 -0
  17. package/src/components/common/NFT.tsx +43 -0
  18. package/src/components/common/NavBar.tsx +138 -0
  19. package/src/components/common/OApp.tsx +42 -0
  20. package/src/components/common/ONET.tsx +51 -0
  21. package/src/components/common/ONODE.tsx +50 -0
  22. package/src/components/common/OasisModal.tsx +30 -0
  23. package/src/components/common/ProviderDropdown.tsx +26 -0
  24. package/src/components/common/Providers.tsx +39 -0
  25. package/src/components/common/Quest.tsx +41 -0
  26. package/src/components/common/SearchAvatars.tsx +50 -0
  27. package/src/components/common/Seeds.tsx +40 -0
  28. package/src/components/common/Settings.tsx +71 -0
  29. package/src/components/common/StarField.tsx +57 -0
  30. package/src/components/common/Wallet.tsx +46 -0
  31. package/src/components/popups/avatar/components/AvatarWallet.tsx +170 -0
  32. package/src/components/popups/avatar/components/EditAvatar.tsx +35 -0
  33. package/src/components/popups/avatar/components/SearchAvatar.tsx +35 -0
  34. package/src/components/popups/avatar/components/ViewAvatar.tsx +149 -0
  35. package/src/components/popups/avatar/index.tsx +40 -0
  36. package/src/components/popups/comingsoon/ComingSoon.tsx +29 -0
  37. package/src/components/popups/confirmation/Confirmation.tsx +31 -0
  38. package/src/components/popups/contact/index.tsx +101 -0
  39. package/src/components/popups/data-screen/components/AddData.tsx +90 -0
  40. package/src/components/popups/data-screen/components/CrossChainManagement.tsx +88 -0
  41. package/src/components/popups/data-screen/components/LoadData.tsx +158 -0
  42. package/src/components/popups/data-screen/components/ManageData.tsx +35 -0
  43. package/src/components/popups/data-screen/components/OffChainManagement.tsx +178 -0
  44. package/src/components/popups/data-screen/components/SearchData.tsx +35 -0
  45. package/src/components/popups/data-screen/index.tsx +53 -0
  46. package/src/components/popups/eggs/components/ManageEggs.tsx +35 -0
  47. package/src/components/popups/eggs/components/SearchEggs.tsx +35 -0
  48. package/src/components/popups/eggs/components/ViewEggs.tsx +35 -0
  49. package/src/components/popups/eggs/index.tsx +32 -0
  50. package/src/components/popups/game/components/SearchProfiles.tsx +35 -0
  51. package/src/components/popups/game/components/ViewAchievements.tsx +35 -0
  52. package/src/components/popups/game/components/ViewLeagues.tsx +35 -0
  53. package/src/components/popups/game/components/ViewTournaments.tsx +35 -0
  54. package/src/components/popups/game/index.tsx +39 -0
  55. package/src/components/popups/karma/components/SearchKarma.tsx +35 -0
  56. package/src/components/popups/karma/components/ViewAvatarKarma.tsx +140 -0
  57. package/src/components/popups/karma/components/ViewKarma.tsx +104 -0
  58. package/src/components/popups/karma/components/VoteKarma.tsx +35 -0
  59. package/src/components/popups/karma/index.tsx +35 -0
  60. package/src/components/popups/map/components/Add2dObjectMap.tsx +35 -0
  61. package/src/components/popups/map/components/Add3dObjectMap.tsx +35 -0
  62. package/src/components/popups/map/components/AddQuestToMap.tsx +35 -0
  63. package/src/components/popups/map/components/DownloadOurWorld.tsx +35 -0
  64. package/src/components/popups/map/components/ManageMap.tsx +35 -0
  65. package/src/components/popups/map/components/PlotRouteOnMap.tsx +35 -0
  66. package/src/components/popups/map/components/SearchMap.tsx +35 -0
  67. package/src/components/popups/map/components/ViewGlobal3dMap.tsx +35 -0
  68. package/src/components/popups/map/components/ViewHalonsOnMap.tsx +35 -0
  69. package/src/components/popups/map/components/ViewOappOnMap.tsx +35 -0
  70. package/src/components/popups/map/components/ViewQuestOnMap.tsx +35 -0
  71. package/src/components/popups/map/index.tsx +80 -0
  72. package/src/components/popups/messages/Message.tsx +87 -0
  73. package/src/components/popups/mission/components/ManageMission.tsx +35 -0
  74. package/src/components/popups/mission/components/SearchMission.tsx +35 -0
  75. package/src/components/popups/mission/components/ViewMission.tsx +35 -0
  76. package/src/components/popups/mission/index.tsx +33 -0
  77. package/src/components/popups/nft/ContactPopup.tsx +147 -0
  78. package/src/components/popups/nft/Solana.tsx +71 -0
  79. package/src/components/popups/nft/components/ManageOasisNft.tsx +35 -0
  80. package/src/components/popups/nft/components/PurchaseOasisNft.tsx +35 -0
  81. package/src/components/popups/nft/components/PurchaseOasisVirtualLandNft.tsx +35 -0
  82. package/src/components/popups/nft/components/SearchOasisNft.tsx +35 -0
  83. package/src/components/popups/nft/components/ViewOasisNft.tsx +35 -0
  84. package/src/components/popups/nft/index.tsx +46 -0
  85. package/src/components/popups/oapp/components/CreateOAPP.tsx +35 -0
  86. package/src/components/popups/oapp/components/DeployOAPP.tsx +35 -0
  87. package/src/components/popups/oapp/components/DownloadOurWorld.tsx +35 -0
  88. package/src/components/popups/oapp/components/EditOAPP.tsx +35 -0
  89. package/src/components/popups/oapp/components/InstallOAPP.tsx +35 -0
  90. package/src/components/popups/oapp/components/LaunchOAPP.tsx +35 -0
  91. package/src/components/popups/oapp/components/ManageOAPP.tsx +69 -0
  92. package/src/components/popups/oapp/components/SearchOAPP.tsx +35 -0
  93. package/src/components/popups/oapp/index.tsx +63 -0
  94. package/src/components/popups/provider/components/ActivityPub.tsx +35 -0
  95. package/src/components/popups/provider/components/CompareProviderSpeeds.tsx +124 -0
  96. package/src/components/popups/provider/components/Eosio.tsx +35 -0
  97. package/src/components/popups/provider/components/Ethereum.tsx +35 -0
  98. package/src/components/popups/provider/components/Holochain.tsx +35 -0
  99. package/src/components/popups/provider/components/Ipfs.tsx +36 -0
  100. package/src/components/popups/provider/components/ManageAutoFailOver.tsx +35 -0
  101. package/src/components/popups/provider/components/ManageAutoReplicaton.tsx +35 -0
  102. package/src/components/popups/provider/components/ManageLoadBalancing.tsx +35 -0
  103. package/src/components/popups/provider/components/ManageProviders.tsx +35 -0
  104. package/src/components/popups/provider/components/MongoDb.tsx +35 -0
  105. package/src/components/popups/provider/components/Neo4j.tsx +35 -0
  106. package/src/components/popups/provider/components/SearchProviders.tsx +123 -0
  107. package/src/components/popups/provider/components/Seeds.tsx +35 -0
  108. package/src/components/popups/provider/components/Solid.tsx +35 -0
  109. package/src/components/popups/provider/components/SqlLite.tsx +35 -0
  110. package/src/components/popups/provider/components/ThreeFold.tsx +35 -0
  111. package/src/components/popups/provider/components/ViewProviderStats.tsx +124 -0
  112. package/src/components/popups/provider/components/ViewProviders.tsx +122 -0
  113. package/src/components/popups/provider/index.tsx +114 -0
  114. package/src/components/popups/quest/components/ManageQuest.tsx +35 -0
  115. package/src/components/popups/quest/components/SearchQuest.tsx +35 -0
  116. package/src/components/popups/quest/components/ViewQuest.tsx +35 -0
  117. package/src/components/popups/quest/index.tsx +33 -0
  118. package/src/components/popups/seeds/components/AcceptInvite.tsx +62 -0
  119. package/src/components/popups/seeds/components/DonateSeeds.tsx +179 -0
  120. package/src/components/popups/seeds/components/ManageSeeds.tsx +35 -0
  121. package/src/components/popups/seeds/components/PayWithSeeds.tsx +234 -0
  122. package/src/components/popups/seeds/components/RewardSeeds.tsx +179 -0
  123. package/src/components/popups/seeds/components/SearchSeeds.tsx +92 -0
  124. package/src/components/popups/seeds/components/SendInvite.tsx +179 -0
  125. package/src/components/popups/seeds/components/ViewOrganizations.tsx +179 -0
  126. package/src/components/popups/seeds/components/ViewSeeds.tsx +222 -0
  127. package/src/components/popups/seeds/index.tsx +71 -0
  128. package/src/index.ts +129 -0
@@ -0,0 +1,179 @@
1
+ 'use client';
2
+ import React from 'react';
3
+
4
+ import { Modal } from 'react-bootstrap';
5
+ import axios from "axios";
6
+ import { toast } from "react-toastify";
7
+ import API_BASE_URL from "../../../../config/api";
8
+
9
+ class RewardSeeds extends React.Component {
10
+ constructor(){
11
+ super()
12
+ this.state = {
13
+ // avatar: {
14
+ // selected: false,
15
+ // avatar: ''
16
+ // },
17
+ // username: {
18
+ // selected: false,
19
+ // username: '',
20
+ // amount: '',
21
+ // note: ''
22
+ // },
23
+ group: '',
24
+ avatar: '',
25
+ seedUser: '',
26
+ amount: '',
27
+ note: ''
28
+ }
29
+ }
30
+
31
+ handleChange = (e) => {
32
+ console.log(e.target.value)
33
+
34
+ if(e.target.value === "avatar_section" || e.target.value === "username_section") {
35
+ this.setState({
36
+ group: e.target.value
37
+ })
38
+ } else {
39
+ this.setState({[e.target.name]: e.target.value})
40
+ }
41
+ }
42
+
43
+ handleSubmit=(e) => {
44
+ e.preventDefault()
45
+ }
46
+
47
+ getApiData = () => {
48
+ this.setState({ loading: true })
49
+
50
+ axios({
51
+ method: 'post',
52
+ url: API_BASE_URL,
53
+ headers: {
54
+ 'Content-Type': 'application/json'
55
+ },
56
+ })
57
+ .then((response) => {
58
+ this.setState({loading: false})
59
+
60
+ if (response.data.result?.isError) {
61
+ toast.error(response.data.result.message);
62
+ return;
63
+ }
64
+
65
+ toast.success(response.data.result.message);
66
+ })
67
+ .catch((err) => {
68
+ toast.error('err');
69
+ this.setState({loading: false})
70
+ return { error: true, data: err };
71
+ });
72
+ }
73
+
74
+ render() {
75
+ const { show, hide } = this.props;
76
+
77
+ return (
78
+ <>
79
+ <Modal
80
+ centered
81
+ className="custom-modal custom-popup-component"
82
+ show={show}
83
+ onHide={() => hide('seeds', 'rewardSeeds')}
84
+ >
85
+ <Modal.Body>
86
+ <span className="form-cross-icon" onClick={() => hide('seeds', 'rewardSeeds')}>
87
+ <i className="fa fa-times"></i>
88
+ </span>
89
+
90
+ <div className="popup-container default-popup">
91
+ <div className="seed-container paywith-seeds">
92
+ <h1 className="single-heading">
93
+ Pay with Seeds
94
+ </h1>
95
+ <div className="form-container">
96
+ <form onSubmit={this.handleSubmit}>
97
+ <p className="single-form-row">
98
+ <label className="single-radio-btn">
99
+ <input
100
+ type="radio"
101
+ value="avatar_section"
102
+ checked={this.state.group === "avatar_section"}
103
+ onChange={this.handleChange}
104
+ />
105
+ Avatar
106
+ </label>
107
+ <input
108
+ type="text"
109
+ placeholder="username"
110
+ name="avatar"
111
+ value={this.state.avatar}
112
+ onChange={this.handleChange}
113
+ disabled={this.state.group === "username_section"}
114
+ />
115
+ </p>
116
+
117
+ <h3>OR</h3>
118
+
119
+ <p className="single-form-row">
120
+ <label className="single-radio-btn">
121
+ <input
122
+ type="radio"
123
+ value="username_section"
124
+ checked={this.state.group === "username_section"}
125
+ onChange={this.handleChange}
126
+ />
127
+ Seed Username
128
+ </label>
129
+
130
+ <input
131
+ type="text"
132
+ name="seedUser"
133
+ value={this.state.username}
134
+ onChange={this.handleChange}
135
+ placeholder="username"
136
+ disabled={this.state.group === "avatar_section"}
137
+ />
138
+ </p>
139
+
140
+ <p className="single-form-row">
141
+ <label>Amount</label>
142
+ <input
143
+ type="text"
144
+ name="amount"
145
+ value={this.state.amount}
146
+ onChange={this.handleChange}
147
+ disabled={this.state.group === "avatar_section"}
148
+ />
149
+ </p>
150
+
151
+ <p className="single-form-row mb-30">
152
+ <label>Note</label>
153
+ <input
154
+ type="text"
155
+ name="note"
156
+ value={this.state.note}
157
+ onChange={this.handleChange}
158
+ disabled={this.state.group === "avatar_section"}
159
+ />
160
+ </p>
161
+
162
+ <p className="single-form-row btn-right">
163
+ <button
164
+ className="sm-button"
165
+ type="submit"
166
+ >Pay</button>
167
+ </p>
168
+ </form>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ </Modal.Body>
173
+ </Modal>
174
+ </>
175
+ );
176
+ }
177
+ }
178
+
179
+ export default RewardSeeds;
@@ -0,0 +1,92 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { Modal } from "react-bootstrap";
4
+ import '../../../../assets/scss/coming-soon.scss';
5
+ import axios from "axios";
6
+ import { toast } from "react-toastify";
7
+ import API_BASE_URL from "../../../../config/api";
8
+
9
+ class SearchSeeds extends React.Component {
10
+ state = { }
11
+
12
+ getApiData = () => {
13
+ this.setState({ loading: true })
14
+
15
+ axios({
16
+ method: 'get',
17
+ url: API_BASE_URL,
18
+ headers: {
19
+ 'Content-Type': 'application/json'
20
+ },
21
+ })
22
+ .then((response) => {
23
+ this.setState({loading: false})
24
+
25
+ if (response.data.result?.isError) {
26
+ toast.error(response.data.result.message);
27
+ return;
28
+ }
29
+
30
+ toast.success(response.data.result.message);
31
+ })
32
+ .catch((err) => {
33
+ toast.error('err');
34
+ this.setState({loading: false})
35
+ return { error: true, data: err };
36
+ });
37
+ }
38
+
39
+ render() {
40
+ const { show, hide } = this.props;
41
+
42
+ return (
43
+ <>
44
+ <Modal
45
+ size="lg"
46
+ show={show}
47
+ dialogClassName=""
48
+ onHide={() => hide('seeds', 'searchSeeds')}
49
+ >
50
+ <Modal.Body className="seed-modal">
51
+ <div className="heading">
52
+ <h2>Search Seeds</h2>
53
+ </div>
54
+
55
+ <div className="custom-form d-grid grid-gap-20">
56
+ <div className="d-flex justify-content-between">
57
+ <div className="form-field">
58
+ <label>Avatar:</label>
59
+ <input type="text" />
60
+ </div>
61
+
62
+ <div className="form-field">
63
+ <label>Seed Username:</label>
64
+ <input type="text" />
65
+ </div>
66
+ </div>
67
+
68
+ <div className="d-flex justify-content-between">
69
+ <div className="form-field">
70
+ <label>From Date:</label>
71
+ <input type="text" />
72
+ </div>
73
+
74
+ <div className="form-field">
75
+ <label>To Date:</label>
76
+ <input type="text" />
77
+ </div>
78
+ </div>
79
+
80
+ <div className="d-flex grid-gap-20 justify-content-end">
81
+ <button className="white-button submit-button" onClick={() => hide('seeds', 'searchSeeds')}>Cancel</button>
82
+ <button className="submit-button">Search</button>
83
+ </div>
84
+ </div>
85
+ </Modal.Body>
86
+ </Modal>
87
+ </>
88
+ );
89
+ }
90
+ }
91
+
92
+ export default SearchSeeds;
@@ -0,0 +1,179 @@
1
+ 'use client';
2
+ import React from 'react';
3
+
4
+ import { Modal } from 'react-bootstrap';
5
+ import axios from "axios";
6
+ import { toast } from "react-toastify";
7
+ import API_BASE_URL from "../../../../config/api";
8
+
9
+ class SendInvite extends React.Component {
10
+ constructor(){
11
+ super()
12
+ this.state = {
13
+ // avatar: {
14
+ // selected: false,
15
+ // avatar: ''
16
+ // },
17
+ // username: {
18
+ // selected: false,
19
+ // username: '',
20
+ // amount: '',
21
+ // note: ''
22
+ // },
23
+ group: '',
24
+ avatar: '',
25
+ seedUser: '',
26
+ amount: '',
27
+ note: ''
28
+ }
29
+ }
30
+
31
+ handleChange = (e) => {
32
+ console.log(e.target.value)
33
+
34
+ if(e.target.value === "avatar_section" || e.target.value === "username_section") {
35
+ this.setState({
36
+ group: e.target.value
37
+ })
38
+ } else {
39
+ this.setState({[e.target.name]: e.target.value})
40
+ }
41
+ }
42
+
43
+ handleSubmit=(e) => {
44
+ e.preventDefault()
45
+ }
46
+
47
+ getApiData = () => {
48
+ this.setState({ loading: true })
49
+
50
+ axios({
51
+ method: 'post',
52
+ url: API_BASE_URL,
53
+ headers: {
54
+ 'Content-Type': 'application/json'
55
+ },
56
+ })
57
+ .then((response) => {
58
+ this.setState({loading: false})
59
+
60
+ if (response.data.result?.isError) {
61
+ toast.error(response.data.result.message);
62
+ return;
63
+ }
64
+
65
+ toast.success(response.data.result.message);
66
+ })
67
+ .catch((err) => {
68
+ toast.error('err');
69
+ this.setState({loading: false})
70
+ return { error: true, data: err };
71
+ });
72
+ }
73
+
74
+ render() {
75
+ const { show, hide } = this.props;
76
+
77
+ return (
78
+ <>
79
+ <Modal
80
+ centered
81
+ className="custom-modal custom-popup-component"
82
+ show={show}
83
+ onHide={() => hide('seeds', 'sendInvite')}
84
+ >
85
+ <Modal.Body>
86
+ <span className="form-cross-icon" onClick={() => hide('seeds', 'sendInvite')}>
87
+ <i className="fa fa-times"></i>
88
+ </span>
89
+
90
+ <div className="popup-container default-popup">
91
+ <div className="seed-container paywith-seeds">
92
+ <h1 className="single-heading">
93
+ Pay with Seeds
94
+ </h1>
95
+ <div className="form-container">
96
+ <form onSubmit={this.handleSubmit}>
97
+ <p className="single-form-row">
98
+ <label className="single-radio-btn">
99
+ <input
100
+ type="radio"
101
+ value="avatar_section"
102
+ checked={this.state.group === "avatar_section"}
103
+ onChange={this.handleChange}
104
+ />
105
+ Avatar
106
+ </label>
107
+ <input
108
+ type="text"
109
+ placeholder="username"
110
+ name="avatar"
111
+ value={this.state.avatar}
112
+ onChange={this.handleChange}
113
+ disabled={this.state.group === "username_section"}
114
+ />
115
+ </p>
116
+
117
+ <h3>OR</h3>
118
+
119
+ <p className="single-form-row">
120
+ <label className="single-radio-btn">
121
+ <input
122
+ type="radio"
123
+ value="username_section"
124
+ checked={this.state.group === "username_section"}
125
+ onChange={this.handleChange}
126
+ />
127
+ Seed Username
128
+ </label>
129
+
130
+ <input
131
+ type="text"
132
+ name="seedUser"
133
+ value={this.state.username}
134
+ onChange={this.handleChange}
135
+ placeholder="username"
136
+ disabled={this.state.group === "avatar_section"}
137
+ />
138
+ </p>
139
+
140
+ <p className="single-form-row">
141
+ <label>Amount</label>
142
+ <input
143
+ type="text"
144
+ name="amount"
145
+ value={this.state.amount}
146
+ onChange={this.handleChange}
147
+ disabled={this.state.group === "avatar_section"}
148
+ />
149
+ </p>
150
+
151
+ <p className="single-form-row mb-30">
152
+ <label>Note</label>
153
+ <input
154
+ type="text"
155
+ name="note"
156
+ value={this.state.note}
157
+ onChange={this.handleChange}
158
+ disabled={this.state.group === "avatar_section"}
159
+ />
160
+ </p>
161
+
162
+ <p className="single-form-row btn-right">
163
+ <button
164
+ className="sm-button"
165
+ type="submit"
166
+ >Pay</button>
167
+ </p>
168
+ </form>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ </Modal.Body>
173
+ </Modal>
174
+ </>
175
+ );
176
+ }
177
+ }
178
+
179
+ export default SendInvite;
@@ -0,0 +1,179 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { Modal } from "react-bootstrap";
4
+ import '../../../../assets/scss/coming-soon.scss';
5
+ import { AgGridReact } from 'ag-grid-react';
6
+ import axios from "axios";
7
+ import { toast } from "react-toastify";
8
+ import API_BASE_URL from "../../../../config/api";
9
+
10
+ class ViewOrganizations extends React.Component {
11
+ state = {
12
+ columnDefs: [
13
+ {
14
+ field: 'athlete'
15
+ },
16
+ {
17
+ field: 'age',
18
+ filter: 'agNumberColumnFilter',
19
+ maxWidth: 100,
20
+ },
21
+ { field: 'country' },
22
+ {
23
+ field: 'year',
24
+ maxWidth: 100,
25
+ },
26
+ {
27
+ field: 'date',
28
+ filter: 'agDateColumnFilter',
29
+ },
30
+ { field: 'sport' },
31
+ {
32
+ field: 'gold',
33
+ filter: 'agNumberColumnFilter',
34
+ },
35
+ {
36
+ field: 'silver',
37
+ filter: 'agNumberColumnFilter',
38
+ },
39
+ {
40
+ field: 'bronze',
41
+ filter: 'agNumberColumnFilter',
42
+ },
43
+ {
44
+ field: 'total',
45
+ filter: false,
46
+ },
47
+ ],
48
+ defaultColDef: {
49
+ flex: 1,
50
+ minWidth: 150,
51
+ filter: true,
52
+ sortable: true,
53
+ floatingFilter: true,
54
+ resizable: true,
55
+ // overflow:true
56
+ },
57
+ rowData: null,
58
+ };
59
+
60
+ onGridReady = (params) => {
61
+ this.gridApi = params.api;
62
+ this.gridColumnApi = params.columnApi;
63
+
64
+ // const updateData = (data) => {
65
+ // this.setState({ rowData: data });
66
+ // };
67
+
68
+ // fetch('https://www.ag-grid.com/example-assets/olympic-winners.json')
69
+ // .then((resp) => resp.json())
70
+ // .then((data) => updateData(data));
71
+ };
72
+
73
+ loadDataFromApi = () => {
74
+ const jwtToken = localStorage.getItem('jwtToken');
75
+ const headers = {
76
+ 'Authorization': `Bearer ${jwtToken}`,
77
+ 'Content-Type': 'application/json'
78
+ };
79
+
80
+ axios.get(`${API_BASE_URL}/seeds/get-all-organisations`, { headers })
81
+ .then(response => {
82
+ console.log(response)
83
+ // if(response.data.isError) {
84
+ // toast.error(response.data.message)
85
+ // } else {
86
+ // toast.success(response.data.result.message)
87
+ // }
88
+ // // this.props.history.goBack()
89
+ // // console.log(this.props)
90
+ })
91
+ .catch(error => {
92
+ console.log(error)
93
+ })
94
+ }
95
+
96
+ getApiData = () => {
97
+ this.setState({ loading: true })
98
+
99
+ axios({
100
+ method: 'get',
101
+ url: API_BASE_URL,
102
+ headers: {
103
+ 'Content-Type': 'application/json'
104
+ },
105
+ })
106
+ .then((response) => {
107
+ this.setState({loading: false})
108
+
109
+ if (response.data.result?.isError) {
110
+ toast.error(response.data.result.message);
111
+ return;
112
+ }
113
+
114
+ toast.success(response.data.result.message);
115
+ })
116
+ .catch((err) => {
117
+ toast.error('err');
118
+ this.setState({loading: false})
119
+ return { error: true, data: err };
120
+ });
121
+ }
122
+
123
+ render() {
124
+ const { show, hide } = this.props;
125
+
126
+ if(show) {
127
+ // this.loadDataFromApi();
128
+ }
129
+
130
+ return (
131
+ <>
132
+ {/* <Modal
133
+ size="sm"
134
+ show={show}
135
+ dialogClassName=""
136
+ onHide={() => hide('seeds', 'viewOrganizations')}
137
+ >
138
+ <Modal.Body className="text-center coming-soon">
139
+ <img
140
+ src={InfoIcon}
141
+ alt="icon"
142
+ />
143
+ <h2>UI Coming Soon</h2>
144
+ <p>You can use this functionality directly by accessing the OASIS API from the Developer menu.</p>
145
+ <button onClick={() => hide('seeds', 'viewOrganizations')}>OK</button>
146
+ </Modal.Body>
147
+ </Modal> */}
148
+
149
+ <Modal
150
+ size="xl"
151
+ centered
152
+ className="custom-modal custom-popup-component light-custom-popup"
153
+ show={show}
154
+ dialogClassName=""
155
+ onHide={() => hide('seeds', 'viewOrganizations')}
156
+ >
157
+ <Modal.Body>
158
+ <span className="form-cross-icon" onClick={() => hide('seeds', 'viewOrganizations')}>
159
+ <i className="fa fa-times"></i>
160
+ </span>
161
+
162
+ <h1 className="single-heading">Data</h1>
163
+
164
+ <div className="ag-theme-alpine custom-ag-parent">
165
+ <AgGridReact
166
+ columnDefs={this.state.columnDefs}
167
+ defaultColDef={this.state.defaultColDef}
168
+ onGridReady={this.onGridReady}
169
+ rowData={this.state.rowData}
170
+ />
171
+ </div>
172
+ </Modal.Body>
173
+ </Modal>
174
+ </>
175
+ );
176
+ }
177
+ }
178
+
179
+ export default ViewOrganizations;