From fc4dfe4fffce05c91f6766024891bdb39b2a3299 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Tue, 28 May 2024 14:54:05 +0100 Subject: feat(ui): use correct username on welcome screen (#2050) * wip * fetch and use username --- ui/src/components/dotfiles/Aliases.tsx | 2 +- ui/src/components/dotfiles/Vars.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/src/components/dotfiles') diff --git a/ui/src/components/dotfiles/Aliases.tsx b/ui/src/components/dotfiles/Aliases.tsx index 9af3e994..61fd001c 100644 --- a/ui/src/components/dotfiles/Aliases.tsx +++ b/ui/src/components/dotfiles/Aliases.tsx @@ -16,7 +16,7 @@ import { ColumnDef } from "@tanstack/react-table"; import { invoke } from "@tauri-apps/api/core"; import Drawer from "@/components/Drawer"; -import { Alias, inspectHistory } from "@/state/models"; +import { Alias } from "@/state/models"; import { useStore } from "@/state/store"; function deleteAlias(name: string, refreshAliases: () => void) { diff --git a/ui/src/components/dotfiles/Vars.tsx b/ui/src/components/dotfiles/Vars.tsx index 00317b23..b2379aa7 100644 --- a/ui/src/components/dotfiles/Vars.tsx +++ b/ui/src/components/dotfiles/Vars.tsx @@ -32,7 +32,7 @@ function deleteVar(name: string, refreshVars: () => void) { function AddVar({ onAdd: onAdd }: { onAdd?: () => void }) { let [name, setName] = useState(""); let [value, setValue] = useState(""); - let [exp, setExport] = useState(false); + let [exp, setExport] = useState(false); // simple form to add vars return ( @@ -85,7 +85,7 @@ function AddVar({ onAdd: onAdd }: { onAdd?: () => void }) { autoCorrect="off" spellCheck="false" type="checkbox" - value={exp} + value={exp.toString()} onChange={(e) => setExport(e.target.checked)} /> Export the var and make it visible to subprocesses -- cgit v1.3.1