Skip to content

Commit

Permalink
Merge pull request #109 from GenaDrop/stagging
Browse files Browse the repository at this point in the history
Stagging
  • Loading branch information
Jikugodwill authored Feb 6, 2024
2 parents 2f24dbc + 53e2831 commit 7445254
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 16 deletions.
4 changes: 2 additions & 2 deletions apps/BosGenaDrop/widget/DropFlow/ArtistPage/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if (!accountId) {
return (
<Wrapper>
<Widget
src={`/*__@appAccount__*//widget/DropFlow.ArtistPage.theme${themeNumber}`}
src={`bos.genadrop.near/widget/DropFlow.ArtistPage.theme${themeNumber}`}
props={{
profile,
accountId,
Expand All @@ -105,4 +105,4 @@ return (
}}
/>
</Wrapper>
);
);
4 changes: 2 additions & 2 deletions apps/BosGenaDrop/widget/DropFlow/ArtistPage/Tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ return (
Don't have Page?{" "}
<Link
className="btn btn-outline-secondary rounded-5"
href={`//*__@appAccount__*//widget/DropFlow.CreatePage.Index?pageOwnerId=${pageOwnerId}`}
href={`/bos.genadrop.near/widget/DropFlow.CreatePage.Index?pageOwnerId=${pageOwnerId}`}
>
Create One
</Link>
Expand Down Expand Up @@ -276,7 +276,7 @@ return (
{profile.discussion.type === "nftcommunity" && (
<Widget
key="discussion"
src="/*__@appAccount__*//widget/CPlanet.Group.Index"
src="bos.genadrop.near/widget/CPlanet.Group.Index"
props={{ groupId: communityAddress[0] }}
/>
)}
Expand Down
8 changes: 4 additions & 4 deletions apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme1.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ if (accountId) {
console.log("nFTCount: ", nFTCount);

// {/* <Widget
// src="/*__@appAccount__*//widget/CPlanet.Profile.Large"
// src="bos.genadrop.near/widget/CPlanet.Profile.Large"
// // props={{
// // accountId,
// // profile,
Expand Down Expand Up @@ -401,7 +401,7 @@ return (
<div>
<Link
className="btn btn-outline-primary rounded-5"
href={`//*__@appAccount__*//widget/DropFlow.CreatePage.Index?accountId=${accountId}`}
href={`/bos.genadrop.near/widget/DropFlow.CreatePage.Index?accountId=${accountId}`}
>
<i class="bi bi-arrow-up-right-circle"></i>
{props.createText ?? "Create Your Page"}
Expand Down Expand Up @@ -435,7 +435,7 @@ return (
<Contents>
<MiddleContent>
<Widget
src="/*__@appAccount__*//widget/DropFlow.ArtistPage.Tabs"
src="bos.genadrop.near/widget/DropFlow.ArtistPage.Tabs"
props={{ accountId, profile }}
/>
</MiddleContent>
Expand Down Expand Up @@ -513,4 +513,4 @@ return (
</LeftProfile>
</Contents>
</Root>
);
);
10 changes: 9 additions & 1 deletion build/BosGenaDrop/src/DropFlow/ArtistPage/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ const isMyProfile = accountId === context.accountId;

const profile = Social.getr(`${accountId}/profile`);

// const themeNumber = profile.theme ?? 0;
const themeNumber = profile.theme ?? 0;

console.log("profile", profile);

console.log("theme", themeNumber);

const showThemeButton = profile.theme;

const createText = profile.theme ? "Edit Page" : "Create Your Page";
Expand Down Expand Up @@ -80,6 +85,9 @@ return (
profile,
accountId,
onChangeTheme: () => {
// TODO: increment themeNumber by 1 to max 2 and then set it back to 0
console.log("themeNumber", themeNumber);
console.log("context", context);
const nextThemeNumber = (themeNumber + 1) % 3;
Social.set(
{
Expand All @@ -97,4 +105,4 @@ return (
}}
/>
</Wrapper>
);
);
34 changes: 34 additions & 0 deletions build/BosGenaDrop/src/DropFlow/ArtistPage/Tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,31 @@ const portfolioIds = portfolio && Object.keys(portfolio);

const currentTheme = Number(profile.theme) ?? 0;

// if (portfolioIds) {
// for (let i = 0; i < portfolioIds.length; i++) {
// const id = portfolioIds[i];
// const item = profile.portfolio[id];

// console.log("Image url: ", item.image.cid);
// }
// }

// {description && (
// <Widget
// key="desc"
// loading=""
// src="mob.near/widget/MainPage.N.Post"
// props={{
// accountId: pageOwnerId,
// pinned: true,
// blockHeight: "now",
// content: {
// text: description,
// },
// }}
// />
// )}

const getFirstSBTToken = () => {
const view = Near.view("registry.i-am-human.near", "sbt_tokens_by_owner", {
account: `${context.accountId}`,
Expand Down Expand Up @@ -263,13 +288,20 @@ return (
role="tabpanel"
aria-labelledby="pills-nfts-tab"
>
{/* {state.loadnfts && (
<Widget src="mob.near/widget/N.YourNFTs" props={{ pageOwnerId }} />
)} */}
{nftType === "collection" && (
<Widget
src="bos.genadrop.near/widget/DropFlow.CollectionNFTs"
props={{ contractId: nftAddresses[0], profile }}
/>
)}
{nftType === "single" && (
// <Widget
// src="bos.genadrop.near/widget/DropFlow.AccountNFTs"
// props={{ accountId: nftAddresses[0] }}
// />
<div className="mt-2 row g-4">
{nftAddresses.map((address) => (
<div className="col-md">
Expand All @@ -283,6 +315,7 @@ return (
/>
</div>
))}
{/* <pre>{JSON.stringify(nftAddresses, null, 2)}</pre> */}
</div>
)}
</div>
Expand Down Expand Up @@ -345,6 +378,7 @@ return (
<div className="d-flex align-items-center gap-3 mb-3" key={item}>
<img
src={`https://ipfs.near.social/ipfs/${portfolio[item].image.cid}`}
// className="col-sm"
width="100px"
height="100px"
style={{ objectFit: "cover" }}
Expand Down
12 changes: 6 additions & 6 deletions build/BosGenaDrop/src/DropFlow/ArtistPage/theme1.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ const ImageSection = styled.div`
}
.blurbg {
position: absolute;
left: -35px;
left: 0;
bottom: -40px;
background: #fff;
filter: blur(20px);
-webkit-backdrop-filter: blur(60px);
height: 130px;
width: 130%;
-webkit-backdrop-filter: blur(70px);
height: 160px;
width: 100%;
flex-shrink: 0;
}
.titleArea {
Expand All @@ -103,7 +103,7 @@ const ImageSection = styled.div`
}
.username {
overflow: hidden;
color: #fff;
color: #b0b0b0;
text-overflow: ellipsis;
font-family: Helvetica Neue;
font-size: max(1.5vw, 16px);
Expand Down Expand Up @@ -513,4 +513,4 @@ return (
</LeftProfile>
</Contents>
</Root>
);
);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@types/styled-components": "^5.1.26",
"bos-workspace": "git+https://github.com/NEARBuilders/bos-workspace#main",
"bos-workspace": "^0.0.1-alpha.5",
"lint-staged": "^13.2.1",
"npm-watch": "^0.11.0",
"prettier": "^2.8.8"
Expand Down

0 comments on commit 7445254

Please sign in to comment.