• lib

    • assets currently holds svg assets as react components with props

      • svg
        • /global holds Heart, Cart, and StarGrid svgs
        • /social holds svgs for social icons
        • /state holds Loading Spinner svgs (4 variations)
    • components

      • DebugGrid fixed position element to which you can pass variables to see them. The component is rendered based on a DEBUG_MODE boolean. If DEBUG_MODE is set to true in src/config, then the grid will be shown
      • Modal modal element for content
      • Picture picture element used for optimizing image sizes based on the screen size. Seems to be broken for some reason, don't know why. Maybe because of mismatching image extensions?
      • FetchStates element that displays loading, error states based on two booleans passed to it
    • utils

      • helpers

        • IS_BROWSER() check if the code is run on the the clients browser.
        • IS_PROD() boolean check if currently running the app in production (post build)
        • IS_DEV() boolean check if currently running the app in dev (pre build)
        • generatePassword() return a 16 char long random string
        • fakePause() create a fake pause in async functions
        • slugify() convert an input string to a slug
        • truncateText() truncate input string to a specific lenght
        • convertDateToLocale() convert 2022-06-20T09:31:32Z to 20/06/2022
        • convertDateToYYYYMMDD() convert 2022-06-20T09:31:32Z to 2022-6-20
        • filterDataToSingleItem() filter arrays and return a single value, used for sanity.
      • validate holds functions for validating string inputs based on regex patters

        • emailIsValid() validate email
        • passwordIsValid() validate password
      • hooks holds custom reusable hooks

        • disableScroll not implemented
  • src

    • assets currently holds only the css files
    • client holds the fetch functions for the api that would be used
    • config holds the global config / settings of the project
    • components
      • global holds components that are can be reused all over the project
      • pages holds components that are sorted by the page they are used in