A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: show reload app button in error overlay
Abdullah Atta1ed8205f4542
diff --git a/apps/web/src/components/error-boundary/index.tsx b/apps/web/src/components/error-boundary/index.tsxindex 26c312fdd..89a498874 100644--- a/apps/web/src/components/error-boundary/index.tsx+++ b/apps/web/src/components/error-boundary/index.tsx@@ -101,41 +101,47 @@ export function ErrorComponent({ error, resetErrorBoundary }: FallbackProps) {Fix it</Button>) : (- <>- {" "}- <Button- variant="secondary"- sx={{ alignSelf: "start", px: 30, mt: 1 }}- onClick={async () => {- navigator.clipboard.writeText(errorToString(error));- }}- >- Copy- </Button>- <Button- variant="secondary"- sx={{ alignSelf: "start", px: 30, mt: 1 }}- onClick={async () => {- const { getDeviceInfo } = await import(- "../../dialogs/issue-dialog"- );- const mailto = new URL("mailto:[email protected]");- mailto.searchParams.set(- "body",- `${errorToString(error)}+ <Button+ variant="error"+ sx={{ alignSelf: "start", px: 30, mt: 1 }}+ onClick={() => window.location.reload()}+ >+ Reload app+ </Button>+ )}+ <>+ <Button+ variant="secondary"+ sx={{ alignSelf: "start", px: 30, mt: 1 }}+ onClick={async () => {+ navigator.clipboard.writeText(errorToString(error));+ }}+ >+ Copy+ </Button>+ <Button+ variant="secondary"+ sx={{ alignSelf: "start", px: 30, mt: 1 }}+ onClick={async () => {+ const { getDeviceInfo } = await import(+ "../../dialogs/issue-dialog"+ );+ const mailto = new URL("mailto:[email protected]");+ mailto.searchParams.set(+ "body",+ `${errorToString(error)}---Device information:${getDeviceInfo()}`- );- window.open(mailto.toString(), "_blank");- }}- >- Contact support- </Button>- </>- )}+ );+ window.open(mailto.toString(), "_blank");+ }}+ >+ Contact support+ </Button>+ </></Flex></Flex></BaseThemeProvider>