mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-10 14:22:53 +01:00
chore: Update "Used in x places" text (#84)
We cannot guarantee that this is always correct since there is repeaters and dynamic repeaters etc, but this can give a hint to how many times a component is used.
This commit is contained in:
@@ -991,7 +991,7 @@ export class ComponentsPanelView extends View {
|
||||
|
||||
// Find references
|
||||
const nodeReference = HACK_findNodeReference(scope.comp.name);
|
||||
const nodeReferencesText = `Used in ${nodeReference?.referenaces?.length || 0} places`;
|
||||
const nodeReferencesText = `Used in ~${nodeReference?.referenaces?.length || 0} places`;
|
||||
|
||||
items = items.concat([
|
||||
{
|
||||
@@ -1122,7 +1122,7 @@ export class ComponentsPanelView extends View {
|
||||
if (scope.canBecomeRoot) {
|
||||
// Find references
|
||||
const nodeReference = HACK_findNodeReference(scope.folder.component.name);
|
||||
const nodeReferencesText = `Used in ${nodeReference?.referenaces?.length || 0} places`;
|
||||
const nodeReferencesText = `Used in ~${nodeReference?.referenaces?.length || 0} places`;
|
||||
|
||||
items = items.concat([{
|
||||
label: nodeReferencesText
|
||||
|
||||
Reference in New Issue
Block a user