Skip to content

Commit 1de3c88

Browse files
committed
Update Collective profile prototype
1 parent a3201a3 commit 1de3c88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1656
-908
lines changed

components/crowdfunding-redesign/CollectiveHeader.tsx

-40
This file was deleted.

components/crowdfunding-redesign/ContributionsList.tsx

-99
This file was deleted.

components/crowdfunding-redesign/CrowdfundingPrototypePage.tsx

-49
This file was deleted.

components/crowdfunding-redesign/DumbTabs.tsx

-27
This file was deleted.

components/crowdfunding-redesign/FundraiserLayout.tsx

+11-24
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import { ProfileModal } from './ProfileModal';
2323
import { ArrowRight } from 'lucide-react';
2424
import { Progress } from '../ui/Progress';
2525
import FormattedMoneyAmount from '../FormattedMoneyAmount';
26-
import { StackedAvatars } from '../Avatar';
26+
2727
import { Button } from '../ui/Button';
2828
import { FormattedMessage } from 'react-intl';
29-
import { TabsList, TabsTrigger } from './DumbTabs';
29+
import { TabsList, TabsTrigger } from './Tabs';
3030
import { ThemeColor } from './ThemeColor';
3131
import ProfileLayout from './ProfileLayout';
3232
import { Goals } from './Goals';
@@ -101,14 +101,14 @@ export function FundraiserLayout({ children, activeTab }) {
101101
</div>
102102

103103
<p>
104-
{account.type === 'EVENT' ? 'Event' : 'Fundraiser'} by{' '}
104+
{account.type === 'EVENT' ? 'Event' : 'Project'} by{' '}
105105
<Link
106106
className="font-semibold text-primary hover:underline"
107107
href={`/preview/${mainAccount.slug}`}
108-
onClick={e => {
109-
e.preventDefault();
110-
showModal(ProfileModal, { account: mainAccount });
111-
}}
108+
// onClick={e => {
109+
// e.preventDefault();
110+
// showModal(ProfileModal, { account: mainAccount });
111+
// }}
112112
>
113113
{mainAccount.name} <ArrowRight className="inline align-middle" size={16} />
114114
</Link>
@@ -133,6 +133,9 @@ export function FundraiserLayout({ children, activeTab }) {
133133
<TabsTrigger href={baseRoute} value="fundraiser" activeTab={activeTab}>
134134
Fundraiser
135135
</TabsTrigger>
136+
<TabsTrigger href={`${baseRoute}/finances`} value="finances" activeTab={activeTab}>
137+
Finances
138+
</TabsTrigger>
136139
<TabsTrigger
137140
href={`${baseRoute}/updates`}
138141
value="updates"
@@ -141,26 +144,10 @@ export function FundraiserLayout({ children, activeTab }) {
141144
>
142145
Updates
143146
</TabsTrigger>
144-
<TabsTrigger
145-
href={`${baseRoute}/contributions`}
146-
value="contributions"
147-
activeTab={activeTab}
148-
count={account.contributionTransactions?.totalCount}
149-
>
150-
Contributions
151-
</TabsTrigger>
152-
<TabsTrigger
153-
href={`${baseRoute}/expenses`}
154-
value="expenses"
155-
activeTab={activeTab}
156-
count={account.expenses?.totalCount}
157-
>
158-
Expenses
159-
</TabsTrigger>
160147
</TabsList>
161148
</div>
162149
</div>
163-
{children}
150+
<div className="flex-1">{children}</div>
164151

165152
<ThemeColor color={fundraiser.primaryColor} />
166153
</React.Fragment>

components/crowdfunding-redesign/FundraisingPage.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,22 @@ export function FundraisingPage() {
5858
allowAttributes
5959
transform={node => {
6060
// Allow some iframes
61-
const attrs = [].slice.call(node.attributes);
62-
if (node.tagName === 'iframe') {
61+
if (node.tagName.toLowerCase() === 'iframe') {
6362
const src = node.getAttribute('src');
6463
const parsedUrl = new URL(src);
6564
const hostname = parsedUrl.hostname;
6665
if (['youtube-nocookie.com', 'www.youtube-nocookie.com', 'anchor.fm'].includes(hostname)) {
67-
const attributes = merge({}, ...attrs.map(({ name, value }) => ({ [name]: value })));
6866
return (
6967
<iframe
70-
{...pick(attributes, ['width', 'height', 'frameborder', 'allowfullscreen'])}
71-
title={attributes.title || 'Embed content'}
68+
width={node.getAttribute('width')}
69+
height={node.getAttribute('height')}
70+
allowFullScreen={node.getAttribute('allowfullscreen') as any}
71+
title={node.getAttribute('title') || 'Embed content'}
7272
src={src}
7373
/>
7474
);
7575
}
76-
} else if (node.tagName === 'a') {
76+
} else if (node.tagName.toLowerCase() === 'a') {
7777
// Open links in new tab
7878
node.setAttribute('target', '_blank');
7979
node.setAttribute('rel', 'noopener noreferrer');

components/crowdfunding-redesign/Goal.tsx

-77
This file was deleted.

0 commit comments

Comments
 (0)