fix: auto select ethiopian when chosing the coop option

This commit is contained in:
Nathnael
2026-08-12 08:25:39 +00:00
parent 85bdaa4afb
commit 2a3a231665
2 changed files with 7 additions and 2 deletions

View File

@@ -169,7 +169,8 @@ export default function OnboardingWizardDialog({
setCooperative(checked);
if (checked) {
setRoles((prev) => prev.filter((r) => r !== "freight_forwarder"));
setNationality((prev) => (prev === "foreign" ? "ethiopian" : prev));
// Ethiopian is then the only answer left, so it is made rather than asked.
setNationality("ethiopian");
}
}, []);
const [documentFiles, setDocumentFiles] = useState<

View File

@@ -29,7 +29,11 @@ export default function NationalitySelect({
<SimpleGrid cols={{ base: 1, sm: excludeForeign ? 1 : 2 }} spacing="md">
<RoleCard
label="Ethiopian Company"
description="Registered in Ethiopia. You'll provide a TIN certificate, commercial registration and national ID."
description={
excludeForeign
? "Registered in Ethiopia. You'll provide a TIN certificate, your co-operative registration certificate and national ID."
: "Registered in Ethiopia. You'll provide a TIN certificate, commercial registration and national ID."
}
icon={<MapPin size={22} />}
selected={value === "ethiopian"}
onClick={() => onChange("ethiopian")}