Warning: file_put_contents(/opt/frankenphp/design.onmedianet.com/storage/proxy/cache/94526433b63360f64347e8a7056484b3.html): Failed to open stream: No space left on device in /opt/frankenphp/design.onmedianet.com/app/src/Arsae/CacheManager.php on line 36

Warning: http_response_code(): Cannot set response code - headers already sent (output started at /opt/frankenphp/design.onmedianet.com/app/src/Arsae/CacheManager.php:36) in /opt/frankenphp/design.onmedianet.com/app/src/Models/Response.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /opt/frankenphp/design.onmedianet.com/app/src/Arsae/CacheManager.php:36) in /opt/frankenphp/design.onmedianet.com/app/src/Models/Response.php on line 20
Action center | Pages | WWF

WWF Action Center

Our community of over 11 million Activists worldwide has continued to give us hope as we make strides in protecting the diversity of life on earth.

Take action today ^

What you can do today

`}

${action.title}

${isUSOnly && html`Only individuals with a US address can participate in this action`}

${action.excerpt}

`; } function ActionsList({ actions }) { return html`
    ${actions.map(action => html` <${Action} action="${action}" key="${action._id}" /> `)}
`; } async function getActions() { const response = await fetch("https://wwf-actioncenteren.azurewebsites.net/api/pages"); const jsonData = await response.json(); console.log(jsonData); return jsonData; } function campaignAttributesIncludesPromos(campaignAttributes) { return campaignAttributes.includes('Promo 1') || campaignAttributes.includes('Promo 2') || campaignAttributes.includes('Promo 3'); } function App() { const [actions, setActions] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { const fetchActions = async () => { const actions = await getActions(); // create new data structure that pulls out promo campaignattributes const actionsTransformed = actions.map(action => { return { _id: action._id, publishDate: action.publishDate, campaignAttributes: action.campaignAttributes, promo: action.campaignAttributes.find(att => att.search('Promo') >= 0)?.slice(-1), featuredImage: action.featuredImage, featuredImageAttribution: action.featuredImageAttribution, excerpt: action.excerpt, title: action.title, url: action.url, progressBarId: action.progressBarId } }); // find just the actions marked promo and remove them from the list const promoActions = [] const promo1Index = actionsTransformed.findIndex(action => action.promo === '1'); promo1Index >= 0 ? promoActions.push(actionsTransformed.splice(promo1Index, 1)) : undefined; const promo2Index = actionsTransformed.findIndex(action => action.promo === '2'); promo2Index >= 0 ? promoActions.push(actionsTransformed.splice(promo2Index, 1)) : undefined; const promo3Index = actionsTransformed.findIndex(action => action.promo === '3'); promo3Index >= 0 ? promoActions.push(actionsTransformed.splice(promo3Index, 1)) : undefined; // sort promo actions by promo promoActions.sort((a, b) => a.promo - b.promo); //sort remaining actions actionsTransformed.sort((a, b) => b.publishDate - a.publishDate); // sort the attributes by Promo Number setActions((promoActions.flat().concat(actionsTransformed)).slice(0, 3)); setLoading(false); } const result = fetchActions().catch(console.error); }, []); return html` ${loading && html`

Loading...

`} ${!loading && actions.length > 0 && html`<${ActionsList} actions="${actions}" />`} `; } render(html` <${App} />`, document.querySelector('.action-list-js'));

Our work is possible because of you.

Lobby Day 2

December 2024

2024 Advocacy Year in Review

The work WWF does isn’t possible without you. See what we achieved together in 2023.

Read more

piles of plastic bottles in a landfill

April 2024

Ending plastic pollution

WWF activists on why they want to keep plastics out of nature

Read more

Charitie Ropati stands in a dark room looking up

March 2024

Celebrating five years of youth leaders in conservation

WWF Conservation Leadership Award winners continue to make strides to protect the planet

Read more

Make a difference

Panda Ambassador Program

Panda Ambassadors are on the frontlines of environmental activism, leading their communities to engage the public and inspire real change. Panda Ambassadors host fun and educational events and activities, lead groups in marches and protests, and meet with politicians and business leaders.

Are you an environmental leader looking for a supportive and inspiring community?

Learn more
WWF-US / Deb Lindsey