refactor(site): replace UserContext with userXService (#465)

* Install and configure XState

* userXService - typegen not working yet

* Lint, fix error transitions

* Lint

* Change initial state to handle loss of state

* Fix gitignore

* Fix types by hook or by crook

* Use xservice in all pages

* Glue/visual component separation

* Fix dependency merge

* Lint

* Remove UserContext

* Remove inspector

* Add typegen command to site/out

* Fix index page redirects

* DRY up nav and redirects

* Moves based on merge

* Moving Page helpers into Page dir

* Move xservice into src, update script

* Move and storybook navbarview

* Update docs

* Install MSW

* Reorganization, with apologies

* Missed spots

* Add mock handlers

* Configure jest for msw

* Fix typos

* Shift unit test to NavbarView

* Fix test types

* Rename NavbarView test

* Attempt at test, wip

* Fix config

* Be logged out, only warn

* Conditionally show text to help test

* Use a Context for MSW's sake

* mocks -> test_helpers

* Enable dev tools

* Format

* Fix import

* Fixes

* Lint

* run typegen postinstall

Co-authored-by: Bryan Phelps <bryan@coder.com>
This commit is contained in:
Presley Pizzo
2022-03-18 14:07:08 -04:00
committed by GitHub
parent 8fde3ed52f
commit 22f820c69b
43 changed files with 1028 additions and 512 deletions

View File

@ -6,13 +6,13 @@ import CloudCircleIcon from "@material-ui/icons/CloudCircle"
import { Link } from "react-router-dom"
import React from "react"
import * as Constants from "./constants"
import * as API from "../../api"
import * as Types from "../../api/types"
import { WorkspaceSection } from "./WorkspaceSection"
export interface WorkspaceProps {
organization: API.Organization
workspace: API.Workspace
project: API.Project
organization: Types.Organization
workspace: Types.Workspace
project: Types.Project
}
/**