mirror of
https://github.com/ziex-dev/ziex.git
synced 2026-07-20 02:29:36 -06:00
docs: fix missing allocator
This commit is contained in:
parent
a374b6569e
commit
145618d9ba
@ -91,7 +91,7 @@ fn EntryRow(allocator: zx.Allocator, props: EntryRowProps) zx.Component {
|
||||
const indent = std.fmt.allocPrint(allocator, "padding-left: {d}rem", .{props.depth * 1}) catch "padding-left: 0";
|
||||
|
||||
return (
|
||||
<>
|
||||
<fragment @allocator={allocator}>
|
||||
<div class="project-tree-row" style={indent} @allocator={allocator}>
|
||||
<span class={if (is_folder) "project-tree-folder" else "project-tree-file"} translate="no">
|
||||
{if (is_folder) (<FolderIcon />) else (<FileIcon name={entry.name} />)}
|
||||
@ -104,7 +104,7 @@ fn EntryRow(allocator: zx.Allocator, props: EntryRowProps) zx.Component {
|
||||
{if (entry.children) |children| (
|
||||
renderChildren(allocator, children, props.depth + 1, props.show_descriptions)
|
||||
)}
|
||||
</>
|
||||
</fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ pub fn TaskList(ctx: *zx.ComponentCtx(struct { tasks: []const Task })) zx.Compon
|
||||
tasks_state = ctx.state([]const Task, ctx.props.tasks);
|
||||
zx.log.info("Tasks: {any}\n", .{ctx.props.tasks});
|
||||
return (
|
||||
<tbody>
|
||||
<tbody @allocator={ctx.allocator}>
|
||||
{for (tasks_state.get()) |task| (
|
||||
<TaskRow key={task.id} task={task} />
|
||||
)}
|
||||
|
||||
@ -247,6 +247,8 @@ fn genIntrospectRoot(
|
||||
}
|
||||
|
||||
fn findZxInPath(b: *std.Build, expected_version: []const u8) ?[]const u8 {
|
||||
// TODO: disable for now, always use from source
|
||||
if (true) return null;
|
||||
const zx_path = b.findProgram(&.{"zx"}, &.{}) catch return null;
|
||||
var exit_code: u8 = undefined;
|
||||
const stdout = b.runAllowFail(&.{ zx_path, "version" }, &exit_code, .ignore) catch return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user