Skip to content

Commit

Permalink
urls as env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitarangelkov committed Nov 29, 2024
1 parent 9a9a2ff commit ff96db9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
5 changes: 5 additions & 0 deletions landingpage/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ROUTE_HOME = '/'
ROUTE_APP = "https://bugbuster.app/"
ROUTE_GITHUB = 'https://github.com/crypto-bug-hunters/bug-buster'
ROUTE_X = 'https://x.com/BugBusterApp'
ROUTE_TELEGRAM = 'https://t.me/+G_CPMEhCHC04MzA5'
4 changes: 3 additions & 1 deletion landingpage/src/components/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ const Logo = ({
...rest
}: Props & React.SVGProps<SVGSVGElement>) => {
return (
<SiteLink to={Routes.home}>
<SiteLink
to={process.env.ROUTE_HOME ? process.env.ROUTE_HOME : Routes.home}
>
{!footer ? (
<svg
width='206'
Expand Down
12 changes: 8 additions & 4 deletions landingpage/src/components/ui/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ const data = {
},
appCTA: {
label: 'Bust Some Bugs',
link: Routes.app,
link: process.env.ROUTE_APP ? process.env.ROUTE_APP : Routes.app,
isExternal: false,
},
navItems: {
navLinks2: [
{
_id: 'nav-1',
path: Routes.github,
path: process.env.ROUTE_GITHUB
? process.env.ROUTE_GITHUB
: Routes.github,
label: 'GitHub',
icon: {
asset: {
Expand All @@ -37,7 +39,7 @@ const data = {
},
{
_id: 'nav-2',
path: Routes.x,
path: process.env.ROUTE_X ? process.env.ROUTE_X : Routes.x,
label: 'X.com',
icon: {
asset: {
Expand All @@ -49,7 +51,9 @@ const data = {
},
{
_id: 'nav-3',
path: Routes.telegram,
path: process.env.ROUTE_TELEGRAM
? process.env.ROUTE_TELEGRAM
: Routes.telegram,
label: 'Telegram',
icon: {
asset: {
Expand Down
8 changes: 5 additions & 3 deletions landingpage/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const data = {
'Bug Buster is on a mission to help secure developer code with streamlined bounties onchain. Submit and sponsor a bounty, or hack for rewards and clout.',
cta1: {
label: 'Bust Some Bugs',
link: Routes.app,
link: process.env.ROUTE_APP ? process.env.ROUTE_APP : Routes.app,
isExternal: false,
},
},
Expand Down Expand Up @@ -131,7 +131,7 @@ const data = {
},
cta: {
label: 'Join the Conversation',
link: Routes.x,
link: process.env.ROUTE_X ? process.env.ROUTE_X : Routes.x,
isExternal: true,
},
},
Expand All @@ -146,7 +146,9 @@ const data = {
},
cta: {
label: 'Reach out',
link: Routes.telegram,
link: process.env.ROUTE_TELEGRAM
? process.env.ROUTE_TELEGRAM
: Routes.telegram,
isExternal: true,
},
},
Expand Down

0 comments on commit ff96db9

Please sign in to comment.