kernel-community / services

Implementation of Kernel services
https://www.kernel.community/
MIT License
15 stars 16 forks source link

Provide a default footer with links to each app #19

Closed rorysaur closed 2 years ago

rorysaur commented 2 years ago
  1. Implement a default footer under @kernel/common with links specified below.
  2. Use this default footer in the existing apps that currently use the common footer:
    • adventures
    • unprofile
    • portal
    • explorer (wait until #3 is merged)
  3. 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:

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).

rorysaur commented 2 years ago

Alon has claimed this task!