Skip to content

Commit

Permalink
refactor(global): ♻️ fix a small bug
Browse files Browse the repository at this point in the history
as we decide we have to pass data in constructor in a pattern so I change that

Red #54
  • Loading branch information
PritamBag committed Jan 6, 2025
1 parent 77d98cd commit 4621282
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/components/data/viewer/Viewer.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export abstract class ViewerData {
protected viewerRenderedComponent: string;

constructor(
viewerType: typeof ViewerFactory.VARIANTS[keyof typeof ViewerFactory.VARIANTS],
entityData: DynamicEntity
entityData: DynamicEntity,
viewerType: typeof ViewerFactory.VARIANTS[keyof typeof ViewerFactory.VARIANTS]
) {
this.viewerId = getWrappidUUID();
this.viewerType = viewerType;
Expand Down
4 changes: 2 additions & 2 deletions app/components/data/viewer/json/JsonViewer.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export class JsonViewerData extends ViewerData{
entityData: DynamicEntity
){
super(
ViewerFactory.VARIANTS.JSON,
entityData
entityData,
ViewerFactory.VARIANTS.JSON
);
this.setViewerRenderedComponent(JSON_VIEWER);
}
Expand Down
4 changes: 2 additions & 2 deletions app/components/data/viewer/model/ModelViewer.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export class ModelViewerData extends ViewerData{
entityData: DynamicEntity
){
super(
ViewerFactory.VARIANTS.MODEL,
entityData
entityData,
ViewerFactory.VARIANTS.MODEL
);
this.setViewerRenderedComponent(MODEL_VIEWER);
}
Expand Down

0 comments on commit 4621282

Please sign in to comment.