{backgroundImage && (
)}
-
+
+ {props.children && props.children}
);
diff --git a/build/potlock/src/Project/Body.jsx b/build/potlock/src/Project/Body.jsx
index e54056d6..925c3a4c 100644
--- a/build/potlock/src/Project/Body.jsx
+++ b/build/potlock/src/Project/Body.jsx
@@ -1,15 +1,9 @@
-console.log("props in Body: ", props);
-
const ownerId = "potlock.near";
const IPFS_BASE_URL = "https://nftstorage.link/ipfs/";
-// const linktree = props.linktree;
-
-// if (!linktree) return "Loading...";
-
const profile = props.profile;
-if (!profile) return "Loading...";
+if (!profile) return "Loading PROFILE...";
const tags = Object.keys(profile.tags ?? {});
diff --git a/build/potlock/src/Project/Card.jsx b/build/potlock/src/Project/Card.jsx
index 654b71c6..37d9e74a 100644
--- a/build/potlock/src/Project/Card.jsx
+++ b/build/potlock/src/Project/Card.jsx
@@ -4,40 +4,44 @@ const Card = styled.a`
display: flex;
flex-direction: column;
width: 100%;
- border-radius: 6px;
- background-color: white;
+ max-width: 30%;
+ border-radius: 7px;
+ background: white;
+ box-shadow: 0px -2px 0px #dbdbdb inset;
+ border: 1px solid #dbdbdb;
&:hover {
text-decoration: none;
cursor: pointer;
}
`;
-const Banner = styled.div`
- position: relative;
- width: 100%;
- height: 168;
- margin-bottom: 30px;
-`;
+// const Banner = styled.div`
+// position: relative;
+// width: 100%;
+// height: 168;
+// margin-bottom: 30px;
+// `;
-const BannerImage = styled.img`
- width: 100%;
- height: 100%;
- // border-radius: 6px;
-`;
+// const BannerImage = styled.img`
+// width: 100%;
+// height: 100%;
+// // border-radius: 6px;
+// `;
-const ProfileImage = styled.img`
- width: 40px;
- height: 40px;
- border-radius: 50%;
- border: 3px solid white;
- position: absolute;
- bottom: -20px;
- left: 60px;
-`;
+// const ProfileImage = styled.img`
+// width: 40px;
+// height: 40px;
+// border-radius: 50%;
+// border: 3px solid white;
+// position: absolute;
+// bottom: -20px;
+// left: 60px;
+// `;
const Info = styled.div`
display: flex;
flex-direction: column;
+ margin-top: 160px;
padding: 16px 24px;
gap: 16px;
`;
@@ -72,10 +76,32 @@ const { id, bannerImageUrl, profileImageUrl, name, description, tags } = props.p
return (
-
-
-
-
+
{name}
{description}
@@ -83,7 +109,7 @@ return (
src={`${ownerId}/widget/Project.Tags`}
props={{
...props,
- tags: Object.keys(tags),
+ tags,
}}
/>
diff --git a/build/potlock/src/Project/CreateForm.jsx b/build/potlock/src/Project/CreateForm.jsx
index 61874121..4a26c4ea 100644
--- a/build/potlock/src/Project/CreateForm.jsx
+++ b/build/potlock/src/Project/CreateForm.jsx
@@ -1,11 +1,11 @@
const ownerId = "potlock.near";
-const registryId = "registry1.tests.potlock.near"; // TODO: update when registry is deployed
+const registryId = "registry.potlock.near"; // TODO: update when registry is deployed
const IPFS_BASE_URL = "https://nftstorage.link/ipfs/";
-const DEFAULT_BANNER_IMAGE_URL =
- IPFS_BASE_URL + "bafkreih4i6kftb34wpdzcuvgafozxz6tk6u4f5kcr2gwvtvxikvwriteci";
-const DEFAULT_PROFILE_IMAGE_URL =
- IPFS_BASE_URL + "bafkreifel4bfm6hxmklcsqjilk3bhvi3acf2rxqepcgglluhginbttkyqm";
+// const DEFAULT_BANNER_IMAGE_URL =
+// IPFS_BASE_URL + "bafkreih4i6kftb34wpdzcuvgafozxz6tk6u4f5kcr2gwvtvxikvwriteci";
+// const DEFAULT_PROFILE_IMAGE_URL =
+// IPFS_BASE_URL + "bafkreifel4bfm6hxmklcsqjilk3bhvi3acf2rxqepcgglluhginbttkyqm";
const ADD_TEAM_MEMBERS_ICON_URL =
IPFS_BASE_URL + "bafkreig6c7m2z2lupreu2br4pm3xx575mv6uvmuy2qkij4kzzfpt7tipcq";
const CLOSE_ICON_URL =
@@ -27,46 +27,23 @@ if (!context.accountId) {
);
}
+const imageHeightPx = 120;
+const profileImageTranslateYPx = 220;
+
const Container = styled.div`
display: flex;
flex-direction: column;
- align-items: center;
- justify-content: center;
width: 100%;
padding: 72px 64px 72px 64px;
`;
-const ProfileImgContainer = styled.div`
- width: 120px;
- height: 120px;
- position: absolute;
- bottom: 0px;
- left: 113px;
- // background-color: pink;
-`;
-
-const Banner = styled.div`
- position: relative;
- width: 100%;
- height: 280px;
- margin-bottom: 132px;
-`;
-
-const BannerImage = styled.img`
- width: 100%;
- height: 100%;
- object-fit: cover;
- border-radius: 6px;
-`;
-
const LowerBannerContainer = styled.div`
position: absolute;
- bottom: -60px;
+ bottom: -210px;
left: 0px;
display: flex;
align-items: stretch; /* Ensuring child elements stretch to full height */
justify-content: space-between;
- // background: pink;
width: 100%;
`;
@@ -74,7 +51,7 @@ const LowerBannerContainerLeft = styled.div`
display: flex;
flex-direction: row;
align-items: flex-end;
- margin-left: 113px;
+ margin-left: 190px;
`;
const LowerBannerContainerRight = styled.div`
@@ -96,19 +73,6 @@ const TeamContainer = styled.div`
// gap: -40px;
`;
-const ProfileImage = styled.img`
- width: ${(props) => props.width}px;
- height: ${(props) => props.height}px;
- border-radius: 50%;
- border: ${(props) => props.borderWidth ?? 5}px solid white;
- margin: ${(props) => props.margin ?? "0px"};
- z-index: ${(props) => props.zIndex ?? 0};
- position: relative;
- // position: absolute;
- // bottom: -60px;
- // left: 113px;
-`;
-
const AddTeamMembers = styled.a`
margin: 0px 0px 16px 36px;
cursor: pointer;
@@ -159,7 +123,6 @@ const FormSectionRightDiv = styled.div`
const FormSectionTitle = styled.div`
color: #2e2e2e;
font-size: 16;
- // font-family: Mona-Sans;
font-weight: 600;
word-wrap: break-word;
`;
@@ -167,14 +130,12 @@ const FormSectionTitle = styled.div`
const FormSectionDescription = styled.div`
color: #2e2e2e;
font-size: 16;
- // font-family: Mona-Sans;
font-weight: 400;
word-wrap: break-word;
`;
const FormSectionIsRequired = styled.div`
font-size: 16px;
- // font-family: Mona-Sans;
font-weight: 400;
word-wrap: break-word;
position: relative;
@@ -259,15 +220,13 @@ const ModalTitle = styled.div`
font-color: #2e2e2e;
font-size: 16px;
font-weight: 600;
- // font-family: Mona-Sans;
`;
const ModalDescription = styled.p`
font-color: #2e2e2e;
font-size: 16px;
font-weight: 400;
- // font-family: Mona-Sans;
-`;
+=`;
const MembersCount = styled.span`
color: #2e2e2e;
@@ -280,6 +239,69 @@ const MembersText = styled.div`
font-weight: 400;
`;
+const MembersListItem = styled.div`
+ padding: 16px 0px;
+ border-top: 1px #f0f0f0 solid;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+`;
+
+const RemoveMember = styled.a`
+ color: #2e2e2e;
+ font-size: 14px;
+ font-weight: 600;
+ visibility: hidden;
+ cursor: pointer;
+ opacity: 0;
+ transition: opacity 0.2s ease-in-out;
+
+ &:hover {
+ text-decoration: none;
+ }
+
+ ${MembersListItem}:hover & {
+ visibility: visible;
+ opacity: 1;
+ }
+`;
+
+const MembersListItemLeft = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-start;
+ gap: 16px;
+`;
+
+const MembersListItemText = styled.div`
+ font-size: 16px;
+ font-weight: 400;
+ color: #2e2e2e;
+`;
+
+const MoreTeamMembersContainer = styled.div`
+ width: 28px;
+ height: 28px;
+ border: 2px solid white;
+ border-radius: 50%;
+ background: #dd3345;
+ position: relative;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ z-index: ${(props) => props.zIndex};
+ margin-right: -8px;
+`;
+
+const MoreTeamMembersText = styled.div`
+ color: white;
+ font-size: 12px;
+ font-weight: 600;
+ text-align: center;
+`;
+
State.init({
name: "",
nameError: "",
@@ -295,10 +317,6 @@ State.init({
telegramError: "",
github: "",
githubError: "",
- profileImageUrl: "",
- profileImageError: "",
- bannerImageCid: "",
- bannerImageError: "",
socialDataFetched: false,
socialDataIsFetching: false,
registeredProjects: null,
@@ -328,26 +346,11 @@ const Modal = ({ isOpen, onClose, children }) => {
};
if (context.accountId && !state.socialDataFetched) {
- // State.update({ socialDataIsFetching: true });
- // const socialData = Social.get(`${context.accountId}/profile/**`);
Near.asyncView("social.near", "get", { keys: [`${context.accountId}/profile/**`] })
.then((socialData) => {
if (!socialData) return;
- console.log("social data for current user: ", socialData);
const profileData = socialData[context.accountId].profile;
if (!profileData) return;
- // get profile image URL
- let profileImageUrl = DEFAULT_PROFILE_IMAGE_URL;
- if (profileData.image) {
- const imageUrl = getImageUrlFromSocialImage(profileData.image);
- if (imageUrl) profileImageUrl = imageUrl;
- }
- // get banner image URL
- let bannerImageUrl = DEFAULT_BANNER_IMAGE_URL;
- if (profileData.backgroundImage) {
- const imageUrl = getImageUrlFromSocialImage(profileData.backgroundImage);
- if (imageUrl) bannerImageUrl = imageUrl;
- }
// description
let description = profileData.description || "";
// linktree
@@ -366,14 +369,11 @@ if (context.accountId && !state.socialDataFetched) {
telegram,
github,
website,
- profileImageUrl,
- bannerImageUrl,
socialDataFetched: true,
teamMembers: Object.keys(team).map((accountId) => ({
accountId,
imageUrl: DEFAULT_PROFILE_IMAGE_URL, // TODO: fetch actual image from near social. or better, move ProfileImage to its own component that handles the social data fetching
})),
- // socialDataIsFetching: false,
});
})
.catch((e) => {
@@ -393,61 +393,6 @@ if (context.accountId && !state.registeredProjects) {
});
}
-const FormSectionLeft = (title, description, isRequired) => {
- return (
-
- {title}
- {description}
-
- {isRequired ? "Required" : "Optional"}
- {isRequired && (
-
-
-
- )}
-
-
- );
-};
-
-const BannerImageWithFallback = (props) => {
- const [bannerImageUrl, setBannerImageUrl] = useState(props.src);
- const handleBannerImageError = (event) => {
- event.stopPropagation();
- event.target.onerror = null;
- setBannerImageUrl(DEFAULT_BANNER_IMAGE_URL);
- };
- return ;
-};
-
-// _NB: commenting this out for now; for some reason profileImageUrl inherits bannerImageUrl's value and is NOT set to props.src. this seems to be a bug with useState implementation_
-// const ProfileImageWithFallback = (props) => {
-// const [profileImageUrl, setProfileImageUrl] = useState(props.src);
-// const handleError = (event) => {
-// event.stopPropagation();
-// event.target.onerror = null;
-// setProfileImageUrl(DEFAULT_PROFILE_IMAGE_URL);
-// };
-// return ;
-// };
-
const isCreateProjectDisabled =
!state.name ||
state.nameError ||
@@ -496,79 +441,12 @@ const handleCreateProject = (e) => {
const res = Near.call(transactions);
};
-console.log("state: ", state);
-
const registeredProject = state.registeredProjects
? state.registeredProjects?.find(
(project) => project.id == context.accountId && project.status == "Approved"
)
: null;
-// TODO: Move these elsewhere
-const MembersListItem = styled.div`
- padding: 16px 0px;
- border-top: 1px #f0f0f0 solid;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
-`;
-
-const RemoveMember = styled.a`
- color: #2e2e2e;
- font-size: 14px;
- font-weight: 600;
- visibility: hidden;
- cursor: pointer;
- opacity: 0;
- transition: opacity 0.2s ease-in-out;
-
- &:hover {
- text-decoration: none;
- }
-
- ${MembersListItem}:hover & {
- visibility: visible;
- opacity: 1;
- }
-`;
-
-const MembersListItemLeft = styled.div`
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: flex-start;
- gap: 16px;
-`;
-
-const MembersListItemText = styled.div`
- font-size: 16px;
- font-weight: 400;
- color: #2e2e2e;
-`;
-
-const MoreTeamMembersContainer = styled.div`
- width: 28px;
- height: 28px;
- border: 2px solid white;
- border-radius: 50%;
- background: #dd3345;
- position: relative;
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: ${(props) => props.zIndex};
- margin-right: -8px;
-`;
-
-const MoreTeamMembersText = styled.div`
- color: white;
- font-size: 12px;
- font-weight: 600;
- text-align: center;
- // font-family: Mona-Sans;
-`;
-
const handleAddTeamMember = () => {
let isValid = NEAR_ACCOUNT_ID_REGEX.test(state.teamMember);
// Additional ".near" check for IDs less than 64 characters
@@ -591,7 +469,6 @@ const handleAddTeamMember = () => {
};
Near.asyncView("social.near", "get", { keys: [`${state.teamMember}/profile/**`] })
.then((socialData) => {
- console.log("social data line 554: ", socialData);
if (socialData) {
const profileData = socialData[state.teamMember].profile;
if (!profileData) return;
@@ -599,7 +476,6 @@ const handleAddTeamMember = () => {
if (profileData.image) {
const imageUrl = getImageUrlFromSocialImage(profileData.image);
if (imageUrl) fullTeamMember.imageUrl = imageUrl;
- console.log("fullTeamMember.imageUrl line 562: ", fullTeamMember.imageUrl);
}
}
})
@@ -607,7 +483,6 @@ const handleAddTeamMember = () => {
console.log("error getting social data: ", e);
})
.finally(() => {
- console.log("fullTeamMember.imageUrl line 570: ", fullTeamMember.imageUrl);
State.update({
teamMembers: [...state.teamMembers, fullTeamMember],
teamMember: "",
@@ -617,13 +492,47 @@ const handleAddTeamMember = () => {
}
};
+const FormSectionLeft = (title, description, isRequired) => {
+ return (
+
+ {title}
+ {description}
+
+ {isRequired ? "Required" : "Optional"}
+ {isRequired && (
+
+
+
+ )}
+
+
+ );
+};
+
return (
{!state.socialDataFetched ? (
- Loading...
+
) : registeredProject ? (
- <>
- You've successfully registered!
+
+ You've successfully registered!
- >
+
) : (
<>
-
-
-
-
-
- State.update({ isModalOpen: true })}>
- Add team members
-
-
-
-
- {state.teamMembers.length > MAX_TEAM_MEMBERS_DISPLAY_COUNT && (
-
- {MAX_TEAM_MEMBERS_DISPLAY_COUNT}+
-
- )}
- {state.teamMembers
- .slice(0, MAX_TEAM_MEMBERS_DISPLAY_COUNT)
- .map((teamMember, idx) => {
- return (
-
- );
- })}
-
-
-
-
-
+
+
+ State.update({ isModalOpen: true })}>
+ Add team members
+
+
+
+
+ {state.teamMembers.length > MAX_TEAM_MEMBERS_DISPLAY_COUNT && (
+
+ {MAX_TEAM_MEMBERS_DISPLAY_COUNT}+
+
+ )}
+ {state.teamMembers
+ .slice(0, MAX_TEAM_MEMBERS_DISPLAY_COUNT)
+ .map((teamMember, idx) => {
+ return (
+
+ );
+ })}
+
+
+
+ ),
+ }}
+ />
+
-
- {/* */}
-
{FormSectionLeft(
"Project details",
@@ -899,7 +835,22 @@ return (
return (
-
+
@{teamMember.accountId}
-
+
(props.disabled ? "not-allowed" : "pointer")};
&:hover {
text-decoration: none;
@@ -48,6 +47,12 @@ const itemIconUrls = {
NEAR: IPFS_BASE_URL + "bafkreigogi7iyonbdjsxi3n6seplll7at6e4jsrxwpgke5b5uk5obxkdpe",
};
+const fullUrls = {
+ twitter: (handle) => `https://twitter.com/${handle}`,
+ github: (username) => `https://github.com/${username}`,
+ website: (url) => url,
+};
+
return (
{Object.entries(linktree).map(([k, v], idx) => {
@@ -55,8 +60,14 @@ return (
{
+ if (!v) {
+ e.preventDefault();
+ }
+ }}
>
{k[0].toUpperCase() + k.slice(1)}
@@ -67,7 +78,7 @@ return (
NEAR
diff --git a/build/potlock/src/Project/ListPage.jsx b/build/potlock/src/Project/ListPage.jsx
index faa1f022..dd56b39f 100644
--- a/build/potlock/src/Project/ListPage.jsx
+++ b/build/potlock/src/Project/ListPage.jsx
@@ -1,5 +1,5 @@
const ownerId = "potlock.near";
-const registryId = "registry1.tests.potlock.near"; // TODO: update when registry is deployed
+const registryId = "registry.potlock.near"; // TODO: update when registry is deployed
const IPFS_BASE_URL = "https://nftstorage.link/ipfs/";
const DEFAULT_BANNER_IMAGE_URL =
@@ -15,6 +15,15 @@ const getImageUrlFromSocialImage = (image) => {
}
};
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+`;
+
const HeroOuter = styled.div`
padding: 136px 64px;
`;
@@ -26,18 +35,13 @@ const HeroInner = styled.div`
justify-content: space-between;
`;
-const Separator = styled.div`
- width: 100%;
- height: 96px;
- background-color: #f8f8f8;
-`;
-
const SectionHeader = styled.div`
display: flex;
flex-direction: row;
width: 100%;
align-items: center;
margin-bottom: 24px;
+ padding: 96px 64px 24px 64px;
`;
const SectionTitle = styled.div`
@@ -58,7 +62,8 @@ const ProjectsContainer = styled.div`
display: flex;
flex-direction: column;
align-items: center;
- padding: 96px 64px;
+ // padding: 0px 64px 96px 64px;
+ // background: #fafafa;
`;
State.init({
@@ -80,11 +85,8 @@ if (context.accountId && !state.registeredProjects) {
Near.asyncView("social.near", "get", {
keys: projects.map((project) => `${project.id}/profile/**`),
}).then((socialData) => {
- console.log("social data: ", socialData);
const formattedProjects = projects.map((project) => {
- console.log("project line 153: ", project);
const profileData = socialData[project.id]?.profile;
- console.log("profileData line 154: ", profileData);
let profileImageUrl = DEFAULT_PROFILE_IMAGE_URL;
if (profileData.image) {
const imageUrl = getImageUrlFromSocialImage(profileData.image);
@@ -104,10 +106,8 @@ if (context.accountId && !state.registeredProjects) {
profileImageUrl,
tags: [profileData.category.text ?? ""], // TODO: change this to get tags from horizon/social
};
- console.log("formatted: ", formatted);
return formatted;
});
- console.log("formatted projects: ", formattedProjects);
State.update({ registeredProjects: formattedProjects });
});
})
@@ -117,9 +117,7 @@ if (context.accountId && !state.registeredProjects) {
});
}
-console.log("state: ", state);
-
-if (!state.registeredProjects) return <>Loading...>;
+if (!state.registeredProjects) return "";
return (
<>
@@ -154,14 +152,6 @@ return (
),
}}
/>
-
- {/* Featured projects */}
- {/* */}
All projects
diff --git a/build/potlock/src/Project/ListSection.jsx b/build/potlock/src/Project/ListSection.jsx
index 8c9ca50d..8aef394a 100644
--- a/build/potlock/src/Project/ListSection.jsx
+++ b/build/potlock/src/Project/ListSection.jsx
@@ -5,10 +5,11 @@ const Container = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
- padding: 48px 0px;
+ padding: 48px 64px;
gap: 40px;
width: 100%;
border-top: 2px #dbdbdb solid;
+ background: #fafafa;
`;
const List = styled.div`
@@ -38,8 +39,6 @@ const List = styled.div`
}
`;
-console.log("props.projects: ", props.projects);
-
return (
{props.projects.map((project) => renderItem(project))}
diff --git a/build/potlock/src/Project/NavOptions.jsx b/build/potlock/src/Project/NavOptions.jsx
index e1929db3..3e842f62 100644
--- a/build/potlock/src/Project/NavOptions.jsx
+++ b/build/potlock/src/Project/NavOptions.jsx
@@ -1,5 +1,3 @@
-console.log("props in NavOptions: ", props);
-
const navOptions = [
{
label: "Home",
@@ -23,8 +21,6 @@ const navOptions = [
},
];
-console.log("props.nav: ", props.nav);
-
const getSelectedNavOption = () => {
const navOption = navOptions.find((option) => option.label == props.nav);
return navOption ?? navOptions[0];
diff --git a/build/potlock/src/Project/Team.jsx b/build/potlock/src/Project/Team.jsx
index 60eb4e84..0520b566 100644
--- a/build/potlock/src/Project/Team.jsx
+++ b/build/potlock/src/Project/Team.jsx
@@ -44,8 +44,6 @@ const TeamMemberAccountId = styled.div`
const team = props.team ?? {};
-console.log("team in Team: ", team);
-
const imageWidthPx = 129;
const ImageContainer = styled.div`
@@ -63,11 +61,6 @@ return (
{props.team.map((teamMember) => {
- console.log("teammember: ", teamMember);
- console.log(
- "state.teamMembersProfiles[teamMember]: ",
- state.teamMembersProfiles[teamMember]
- );
return (
@{teamMember}