Skip to content

Commit

Permalink
feat: add Tez4Pal feed (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zir0h authored Feb 4, 2024
1 parent e812f2b commit ca0cc29
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/header/feed_toolbar/FeedToolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const locationMap = new Map([
['/feed/friends', 'Friends'],
// separator
['---fund_feeds', 'fund_feeds'],
['/feed/tez4pal', '🇵🇸 Tez4Pal'],
['/feed/morocco-quake-aid', '🇲🇦 Quake Aid'],
['/feed/quake-aid', '🇹🇷🇸🇾 Quake Aid'],
['/feed/ukraine', '🇺🇦 Ukraine'],
Expand Down
9 changes: 9 additions & 0 deletions src/components/header/sample_events.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
// DEV SAMPLES
export const sample_events = [
{
title: 'Tez4Pal',
icon: '🇵🇸',
feed: 'tez4pal',
link: 'https://twitter.com/LN0ir/status/1745946304742576400',
subtitle: 'January 20 to February 20 2024',
content:
'The Tezos Fundraiser #Tez4Pal, supporting Gaza civilians, is scheduled from Jan 20 to Feb 20.',
},
{
title: 'TezQuakeAid - Morocco',
icon: '🇲🇦 ',
Expand Down
5 changes: 5 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const FEED_LIST = [
'New OBJKTs',
'Friends',
'Quake Aid',
'🇵🇸 Tez4Pal',
'🇺🇦 Ukraine',
'🇵🇰 Pakistan',
'🇮🇷 Iran',
Expand Down Expand Up @@ -136,6 +137,7 @@ export const MARKETPLACE_CONTRACTS_TO_NAME = flipObject(

export const HEN_CONTRACT_FA2 = 'KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton'

export const TEZ4PAL_FUNDING_ADDRESS = 'tz2TfuukrHVoeUqFvcRViPJ2VqL7nEQi7xgW'
export const UKRAINE_FUNDING_CONTRACT = 'KT1DWnLiUkNtAQDErXxudFEH63JC6mqg3HEx'
export const PAKISTAN_FUNDING_CONTRACT = 'KT1Jpf2TAcZS7QfBraQMBeCxjFhH6kAdDL4z'
export const IRAN_FUNDING_CONTRACT = 'KT1KYfj97fpdomqyKsZSBdSVvh9afh93b4Ge'
Expand Down Expand Up @@ -405,6 +407,9 @@ export const TabIndex = {
// TODO - get this manageable on-chain
export const ossProjects = [
{
name: 'Tez4Pal Fundraiser',
address: 'tz2TfuukrHVoeUqFvcRViPJ2VqL7nEQi7xgW',
}, {
name: 'TezQuakeAid Morocco Fundraiser',
address: 'KT1RwXEP8Sj1UQDHPG4oEjRohBdzG2R7FCpA',
},
Expand Down
2 changes: 2 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
MarkdownFeed,
QuakeFeed,
MoroccoQuakeFeed,
Tez4PalFeed,
} from '@pages/home/feeds'
import Mint from '@pages/mint'
import { ObjktDisplay } from '@pages/objkt-display'
Expand Down Expand Up @@ -94,6 +95,7 @@ const router = createBrowserRouter(
/>

<Route path="iran" element={<IranFeed />} />
<Route path="tez4pal" element={<Tez4PalFeed />} />
<Route path="morocco-quake-aid" element={<MoroccoQuakeFeed />} />
<Route path="quake-aid" element={<QuakeFeed />} />
<Route path="iran" element={<IranFeed />} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/feeds/fund-feed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function FundFeed({
<p>{introText}</p>

<a href={infoUrl} target="_blank" rel="noreferrer">
More infos <strong>here</strong>
More info <strong>here</strong>
</a>
</div>
<TokenCollection
Expand Down
14 changes: 14 additions & 0 deletions src/pages/home/feeds/fund-feeds.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
TEZ4PAL_FUNDING_ADDRESS,
IRAN_FUNDING_CONTRACT,
MOROCCO_QUAKE_FUNDING_CONTRACT,
PAKISTAN_FUNDING_CONTRACT,
Expand Down Expand Up @@ -95,3 +96,16 @@ export function MoroccoQuakeFeed() {
/>
)
}

export function Tez4PalFeed() {
return (
<FundFeed
introText={<>The Tezos Fundraiser #Tez4Pal, supporting Gaza civilians.</>}
contractAddress={TEZ4PAL_FUNDING_ADDRESS}
cause="Supporting Gaza civilians"
namespace="tez4pal"
tags={['Tez4Pal', '#Tez4Pal', 'tez4pal', '#tez4pal']}
infoUrl="https://twitter.com/LN0ir/status/1745946304742576400"
/>
)
}
1 change: 1 addition & 0 deletions src/pages/home/feeds/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export {
UkraineFeed,
QuakeFeed,
MoroccoQuakeFeed,
Tez4PalFeed,
} from './fund-feeds'
export { FriendsFeed } from './friends-feed'
export { RandomFeed } from './random-feed'
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const feedComponentMap: FeedComponentMap = {
'Quake Aid': FEEDS.QuakeFeed,
'🇵🇰 Pakistan': FEEDS.PakistanFeed,
'🇺🇦 Ukraine': FEEDS.UkraineFeed,
'🇵🇸 Tez4Pal': FEEDS.Tez4PalFeed,
Random: FEEDS.RandomFeed,
'New OBJKTs': FEEDS.NewObjktsFeed,
'3D': FEEDS.GlbFeed,
Expand Down

0 comments on commit ca0cc29

Please sign in to comment.