Created
March 2, 2021 21:55
-
-
Save kyleshevlin/006e88c360b4b8fd56be02bdea8dc62a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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