-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(website): badge for highlighting active campaign on landing p…
…age (#794)
- Loading branch information
Showing
6 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
website/src/app/[lang]/[region]/(website)/(home)/(sections)/active-campaign.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { WebsiteLanguage } from '@/i18n'; | ||
import { BellAlertIcon } from '@heroicons/react/24/solid'; | ||
import { Translator } from '@socialincome/shared/src/utils/i18n'; | ||
import { Badge, BaseContainer, Typography } from '@socialincome/ui'; | ||
import Link from 'next/link'; | ||
|
||
export async function Campaign({ lang }: { lang: WebsiteLanguage }) { | ||
const translator = await Translator.getInstance({ | ||
language: lang, | ||
namespaces: ['website-donate'], | ||
}); | ||
|
||
return ( | ||
<BaseContainer className="mb-8 flex flex-col items-center justify-center sm:mb-0"> | ||
<Link href="https://socialincome.org/campaign/MZmXEVHlDjOOFOMk82jW" className="group"> | ||
<Badge variant="outline" className="flex-shrink-0"> | ||
<Typography | ||
size="md" | ||
color="primary" | ||
weight="normal" | ||
className="group-hover:text-primary-foreground flex items-center p-1" | ||
> | ||
<BellAlertIcon className="mx-4 h-8 w-8 sm:mx-3 sm:h-5 sm:w-5" /> | ||
{translator.t('campaign.badge-highlight')} | ||
</Typography> | ||
<Typography | ||
size="md" | ||
color="secondary" | ||
weight="medium" | ||
className="group-hover:text-primary-foreground mr-4 flex items-center p-1" | ||
> | ||
Rebuilding Lives by Ismatu Gwendolyn | ||
</Typography> | ||
</Badge> | ||
</Link> | ||
</BaseContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters