Implement a default footer under @kernel/common with links specified below.
Use this default footer in the existing apps that currently use the common footer:
adventures
unprofile
portal
explorer (wait until #3 is merged)
For any app on staging (or running locally), the links should all point to the staging apps; likewise for production the links should point to the production apps.
Suggested implementation
I think we can use the existing Footer under @kernel/common and:
If no children were passed, render this default footer with links.
If children present, render children instead of the links. This would be the way to override the content.
Open to other implementations too.
How to get the correct domains
Staging URLs are in the format: staging.{subdomain}.kernel.community
Production urls are in the format: {subdomain}.kernel.community
To get the current env, you can use the .env from each app and look at REACT_APP_DEPLOY_TARGET. (I think you need to get the env in the individual app and maybe pass it into the footer component, as common doesn't have a .env to my knowledge.)
The current subdomains are as follows:
package name in repo
subdomain
link copy
explorer
explorer
explorer
profile
unprofile
unprofile
projects
adventures
adventures
wallet
wallet
portal
For example, the app under packages/projects is deployed to staging.adventures.kernel.community and its link should say adventures.
AFAIK you can't really point the links to dev because it's dependent on which port you're running each app on.
Styling suggestions
Center the row of links, and add some spacing in between each link. Maybe keep them all lowercase (doesn't really matter but we currently have a pattern of lowercased links so we can just go with it for now).
@kernel/common
with links specified below.Suggested implementation
I think we can use the existing
Footer
under@kernel/common
and:children
were passed, render this default footer with links.children
present, renderchildren
instead of the links. This would be the way to override the content. Open to other implementations too.How to get the correct domains
Staging URLs are in the format:
staging.{subdomain}.kernel.community
Production urls are in the format:{subdomain}.kernel.community
To get the current env, you can use the
.env
from each app and look atREACT_APP_DEPLOY_TARGET
. (I think you need to get the env in the individual app and maybe pass it into the footer component, ascommon
doesn't have a.env
to my knowledge.)For example, the app under
packages/projects
is deployed tostaging.adventures.kernel.community
and its link should sayadventures
.AFAIK you can't really point the links to dev because it's dependent on which port you're running each app on.
Styling suggestions
Center the row of links, and add some spacing in between each link. Maybe keep them all lowercase (doesn't really matter but we currently have a pattern of lowercased links so we can just go with it for now).