Fix site setup and login. Fixes #699 (#702)

This commit is contained in:
Dessalines 2022-06-27 16:50:47 -04:00 committed by GitHub
parent 9b8377760a
commit 130748a0c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 55 deletions

View file

@ -123,7 +123,10 @@ export class Home extends Component<any, HomeState> {
listingType: getListingTypeFromProps(
this.props,
ListingType[
this.isoData.site_res.site_view.unwrap().site.default_post_listing_type
this.isoData.site_res.site_view.match({
some: type_ => type_.site.default_post_listing_type,
none: ListingType.Local,
})
]
),
dataType: getDataTypeFromProps(this.props),
@ -186,7 +189,7 @@ export class Home extends Component<any, HomeState> {
componentDidMount() {
// This means it hasn't been set up yet
if (!this.state.siteRes.site_view) {
if (this.state.siteRes.site_view.isNone()) {
this.context.router.history.push("/setup");
}
setupTippy();