Browse Source

Use `SveltePublicationTree` in ToC class

master
buttercat1791 10 months ago
parent
commit
c30484b9bc
  1. 6
      src/lib/components/publications/table_of_contents.svelte.ts

6
src/lib/components/publications/table_of_contents.svelte.ts

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
import { PublicationTree } from "../../data_structures/publication_tree.ts";
import { SveltePublicationTree } from "./svelte_publication_tree.svelte.ts";
export interface TocEntry {
address: string;
@ -12,7 +12,7 @@ export interface TocEntry { @@ -12,7 +12,7 @@ export interface TocEntry {
export class TableOfContents {
#tocRoot: TocEntry | null = null;
#addresses = $state<Map<string, TocEntry>>(new Map());
#publicationTree: PublicationTree;
#publicationTree: SveltePublicationTree;
#pagePathname: string;
/**
@ -23,7 +23,7 @@ export class TableOfContents { @@ -23,7 +23,7 @@ export class TableOfContents {
* `pagePathname` is correct wherever the instance is used. The singleton should be made
* made available to the entire component tree under that page.
*/
constructor(rootAddress: string, publicationTree: PublicationTree, pagePathname: string) {
constructor(rootAddress: string, publicationTree: SveltePublicationTree, pagePathname: string) {
this.#publicationTree = publicationTree;
this.#pagePathname = pagePathname;

Loading…
Cancel
Save