// Get the file where this component is embedded (not the component file itself)
const currentFile = app.workspace.getActiveFile();
const page = currentFile ? dv.page(currentFile.path) : dv.current();
const fields = [
["Company", page?.company],
["Role", page?.role],
["Team", page?.team],
["Manager", page?.manager],
["Location", page?.location],
["Education", page?.education],
["Birthday", page?.birthday],
["Website", page?.website],
["LinkedIn", page?.linkedin],
["GitHub", page?.github],
["How We Met", page?.how_we_met],
["Working On", page?.working_on],
["Challenges", page?.challenges],
["Learning", page?.learning]
];
const nonEmpty = fields.filter(([key, value]) =>
value != null && value !== "" && (Array.isArray(value) ? value.length > 0 : true)
);
if (nonEmpty.length > 0) {
dv.table(["Field", "Value"], nonEmpty);
}