MCPcopy Create free account
hub / github.com/Snapchat/dagger-browser / refresh

Method refresh

browser/src/App.tsx:39–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 }
38
39 async refresh() {
40 if (!this.state.loadedManifest) {
41 if (this.state.manifestFile) {
42 const success = await this.graphManager.loadFile(this.state.manifestFile);
43 this.setState({
44 weightServiceManager: success ? new WeightServiceManager(this.graphManager) : undefined,
45 loadedManifest: true
46 })
47 } else if (this.state.manifestUrl) {
48 const success = await this.graphManager.loadUrl(this.state.manifestUrl, Config.COMPONENTS_MANIFEST_GZIP_URL);
49 this.setState({
50 weightServiceManager: success ? new WeightServiceManager(this.graphManager) : undefined,
51 loadedManifest: true
52 })
53 }
54 }
55 }
56
57 private onChangeManifestUrl(url: string) {
58 this.setState({

Callers 2

componentDidMountMethod · 0.95
componentDidUpdateMethod · 0.95

Calls 2

loadFileMethod · 0.80
loadUrlMethod · 0.80

Tested by

no test coverage detected