mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Remove 'new' from IDocPage
Summary: The value seems unused Test Plan: This is me testing if it's actually unused Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3244
This commit is contained in:
parent
fa9e6eee88
commit
22006754af
@ -350,7 +350,7 @@ export class GristDoc extends DisposableWithEvents {
|
||||
dom.domComputed<IDocPage>(this.activeViewId, (viewId) => (
|
||||
viewId === 'code' ? dom.create((owner) => owner.autoDispose(CodeEditorPanel.create(this))) :
|
||||
viewId === 'acl' ? dom.create((owner) => owner.autoDispose(AccessRules.create(this, this))) :
|
||||
viewId === 'new' || viewId == 'GristDocTour' ? null :
|
||||
viewId === 'GristDocTour' ? null :
|
||||
dom.create((owner) => (this._viewLayout = ViewLayout.create(owner, this, viewId)))
|
||||
)),
|
||||
);
|
||||
|
@ -10,7 +10,7 @@ import {Document} from 'app/common/UserAPI';
|
||||
import clone = require('lodash/clone');
|
||||
import pickBy = require('lodash/pickBy');
|
||||
|
||||
export type IDocPage = number | 'new' | 'code' | 'acl' | 'GristDocTour';
|
||||
export type IDocPage = number | 'code' | 'acl' | 'GristDocTour';
|
||||
|
||||
// What page to show in the user's home area. Defaults to 'workspace' if a workspace is set, and
|
||||
// to 'all' otherwise.
|
||||
@ -356,8 +356,8 @@ export function userOverrideParams(email: string|null, extraState?: IGristUrlSta
|
||||
* parseDocPage is a noop if p is 'new' or 'code', otherwise parse to integer
|
||||
*/
|
||||
function parseDocPage(p: string) {
|
||||
if (['new', 'code', 'acl', 'GristDocTour'].includes(p)) {
|
||||
return p as 'new'|'code'|'acl'|'GristDocTour';
|
||||
if (['code', 'acl', 'GristDocTour'].includes(p)) {
|
||||
return p as 'code'|'acl'|'GristDocTour';
|
||||
}
|
||||
return parseInt(p, 10);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user