Skip to content

Commit

Permalink
Register Hubble setup function method with registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Dec 4, 2024
1 parent 0b6c595 commit 8bb534c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/registries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ClassSetupRegistry {

private members: { [storyName: string]: ClassSetupFunction[] | undefined } = {};

register(setup: ClassSetupFunction, storyName: string) {
register(storyName: string, setup: ClassSetupFunction) {
if (!(storyName in this.members)) {
this.members[storyName] = [];
}
Expand Down
4 changes: 4 additions & 0 deletions src/stories/hubbles_law/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { classSetupRegistry } from "../../registries";
import { hubbleClassSetup } from "./database";
import { router, setup } from "./router";

classSetupRegistry.register("hubbles_law", hubbleClassSetup);

module.exports = {
path: "/hubbles_law",
router,
Expand Down

0 comments on commit 8bb534c

Please sign in to comment.