in app/launch/src/components/Application/useOnMountRouting.js [17:42]
export function useHandleRepoClonedRouteEvent(
initialData,
onRepoCreated,
onError
) {
// Use Effect Hook For Error Handling and
// GitHub on complete callback
useEffect(() => {
const { error, htmlUrl, cloneUrl } = initialData
if (!error && !htmlUrl) {
return // nothing more to do
}
setTimeout(() => {
if (cloneUrl) {
onRepoCreated({
cloneUrl,
htmlUrl,
show: true,
type: 'clone',
})
} else if (error) {
onError(new Error(error.replaceAll('+', ' ')))
}
}, 500)
}, [initialData, onRepoCreated, onError])
}