Skip to content

Commit

Permalink
Remove version page from routes
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterPtato committed Feb 6, 2024
1 parent 377250e commit cbbc282
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 33 deletions.
14 changes: 7 additions & 7 deletions src/elements/pages/dev/game/pages/game-version-draft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ export default class DevGameNamespace extends LitElement {
}

// Redirect to version page
RvtRouter.shared.navigate(
routes.devVersion.build({
gameId: this.game.gameId,
versionId,
namespaceId: this.namespaceId
})
);
// RvtRouter.shared.navigate(
// routes.devVersion.build({
// gameId: this.game.gameId,
// versionId,
// namespaceId: this.namespaceId
// })
// );

// Reset the stored draft
this.clearDraft();
Expand Down
14 changes: 7 additions & 7 deletions src/elements/pages/dev/game/pages/game-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ export default class DevGameNamespace extends LitElement {
);

// Switch to draft view
RvtRouter.shared.navigate(
routes.devVersion.build({
gameId: this.game.gameId,
versionId: this.versionId,
namespaceId: this.namespaceId
})
);
// RvtRouter.shared.navigate(
// routes.devVersion.build({
// gameId: this.game.gameId,
// versionId: this.versionId,
// namespaceId: this.namespaceId
// })
// );
}

render() {
Expand Down
19 changes: 0 additions & 19 deletions src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,25 +320,6 @@ namespace routes {
}
});

export let devVersion = new Route<{ gameId: string; namespaceId: string; versionId: string }>({
path: '/games/:gameId/namespaces/:namespaceId/versions/:versionId',
middlewares: () => [
MIDDLEWARES.validateUuid('gameId'),
MIDDLEWARES.validateUuid('namespaceId'),
MIDDLEWARES.validateUuid('versionId')
],
render({ gameId, namespaceId, versionId }) {
return {
title: 'Game Version',
breadcrumb: { type: 'Namespace', gameId, namespaceId, title: 'Version' },
template: responses.game(gameId, namespaceId, {
namespace: { namespaceId },
version: { versionId }
})
};
}
});

export let devVersionSettings = new Route<{ gameId: string; namespaceId: string }>({
path: '/games/:gameId/namespaces/:namespaceId/settings',
render({ gameId, namespaceId }) {
Expand Down

0 comments on commit cbbc282

Please sign in to comment.