Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function getInitialValues({
thing,
slug,
}): {
return {
_id: thing?._id ?? "",
birb: thing?.workingThing?.birb
? JSON.parse(thing?.workingThing?.birb)
: undefined,
doge: thing?.workingThing?.doge ?? "",
cat: thing?.cat._id ?? slug ?? "",
lemur: thing?.workingThing?.lemur ?? "",
goose: thing?.goose ?? defaultGoose,
manatee: thing?.workingThing?.manatee ?? "",
zebra: thing?.zebra ?? defaultZebra,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment