Skip to content

Commit

Permalink
update team members styling on create form
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanglen committed Nov 7, 2023
1 parent a950d51 commit 96d2c57
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
25 changes: 19 additions & 6 deletions apps/potlock/widget/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,35 @@ const Theme = styled.div`

State.init({
cart: null,
nearToUsd: null,
// nearToUsd: null,
nearToUsd: useCache(
() =>
asyncFetch("https://api.coingecko.com/api/v3/simple/price?ids=near&vs_currencies=usd").then(
(res) => {
console.log("congecko res body: ", res.body);
return res.body.near.usd;
}
),
"nearToUsd",
{ subscribe: false }
),
isCartModalOpen: false,
registryAdmins: null,
});

if (state.nearToUsd === null) {
const res = fetch("https://api.coingecko.com/api/v3/simple/price?ids=near&vs_currencies=usd");
console.log("coingecko res: ", res);
State.update({ nearToUsd: res.body.near.usd });
}
// if (state.nearToUsd === null) {
// const res = fetch("https://api.coingecko.com/api/v3/simple/price?ids=near&vs_currencies=usd");
// console.log("coingecko res: ", res);
// State.update({ nearToUsd: res.body.near.usd });
// }

if (state.registryAdmins === null) {
const registryAdmins = Near.view(registryContractId, "get_admins", {});
State.update({ registryAdmins });
}

console.log("state: ", state);

const tabContentWidget = {
[CREATE_PROJECT_TAB]: "Project.Create",
[EDIT_PROJECT_TAB]: "Project.Create",
Expand Down
2 changes: 1 addition & 1 deletion apps/potlock/widget/Project/CreateForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Container = styled.div`

const LowerBannerContainer = styled.div`
position: absolute;
bottom: -210px;
bottom: -250px;
left: 0px;
display: flex;
align-items: stretch; /* Ensuring child elements stretch to full height */
Expand Down
25 changes: 19 additions & 6 deletions build/potlock/src/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,35 @@ const Theme = styled.div`

State.init({
cart: null,
nearToUsd: null,
// nearToUsd: null,
nearToUsd: useCache(
() =>
asyncFetch("https://api.coingecko.com/api/v3/simple/price?ids=near&vs_currencies=usd").then(
(res) => {
console.log("congecko res body: ", res.body);
return res.body.near.usd;
}
),
"nearToUsd",
{ subscribe: false }
),
isCartModalOpen: false,
registryAdmins: null,
});

if (state.nearToUsd === null) {
const res = fetch("https://api.coingecko.com/api/v3/simple/price?ids=near&vs_currencies=usd");
console.log("coingecko res: ", res);
State.update({ nearToUsd: res.body.near.usd });
}
// if (state.nearToUsd === null) {
// const res = fetch("https://api.coingecko.com/api/v3/simple/price?ids=near&vs_currencies=usd");
// console.log("coingecko res: ", res);
// State.update({ nearToUsd: res.body.near.usd });
// }

if (state.registryAdmins === null) {
const registryAdmins = Near.view(registryContractId, "get_admins", {});
State.update({ registryAdmins });
}

console.log("state: ", state);

const tabContentWidget = {
[CREATE_PROJECT_TAB]: "Project.Create",
[EDIT_PROJECT_TAB]: "Project.Create",
Expand Down
2 changes: 1 addition & 1 deletion build/potlock/src/Project/CreateForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Container = styled.div`

const LowerBannerContainer = styled.div`
position: absolute;
bottom: -210px;
bottom: -250px;
left: 0px;
display: flex;
align-items: stretch; /* Ensuring child elements stretch to full height */
Expand Down

0 comments on commit 96d2c57

Please sign in to comment.