forked from hexbear-collective/hexbear-frontend
8 changed files with 137 additions and 21 deletions
-
3index.html
-
1package.json
-
36src/components/ErrorFallback.tsx
-
2src/components/inbox.tsx
-
7src/components/navbar.tsx
-
2src/components/post-form.tsx
-
41src/index.tsx
-
66yarn.lock
@ -0,0 +1,36 @@ |
|||
import React from 'react'; |
|||
import Sentry from '@sentry/react'; |
|||
import Block from './elements/Block'; |
|||
import { Heading, Textarea, ThemeProvider } from 'theme-ui'; |
|||
import defaultTheme from '../theme'; |
|||
import Button from './elements/Button'; |
|||
|
|||
// https://sentry.io/api/0/projects/{organization_slug}/{project_slug}/user-feedback/
|
|||
|
|||
// event_id (string) — the event ID
|
|||
// name (string) — user's name
|
|||
// email (string) — user's email address
|
|||
// comments (string) — comments supplied by user
|
|||
|
|||
export default function ErrorFallback() { |
|||
async function handleSubmit(e) { |
|||
e.preventDefault(); |
|||
} |
|||
return ( |
|||
<ThemeProvider theme={defaultTheme}> |
|||
<Block |
|||
width="100vw" |
|||
height="100vh" |
|||
display="flex" |
|||
alignItems="center" |
|||
justifyContent="center" |
|||
> |
|||
<Block maxWidth="400px" as="form" onSubmit={handleSubmit}> |
|||
<Heading as="h3">Something Went Wrong</Heading> |
|||
{/* <Textarea /> */} |
|||
{/* <Button>Submit</Button> */} |
|||
</Block> |
|||
</Block> |
|||
</ThemeProvider> |
|||
); |
|||
} |
@ -1,13 +1,4 @@ |
|||
// eslint-disable-next-line no-undef
|
|||
if (process.env.NODE_ENV !== 'development') { |
|||
// @ts-ignore
|
|||
// eslint-disable-next-line no-undef
|
|||
Sentry.init({ |
|||
dsn: |
|||
'https://[email protected]/5336831', |
|||
}); |
|||
} |
|||
|
|||
import * as Sentry from '@sentry/react'; |
|||
import React, { Component } from 'react'; |
|||
import { render } from 'react-dom'; |
|||
import { BrowserRouter, Route, Switch } from 'react-router-dom'; |
|||
@ -41,12 +32,13 @@ import PrivacyPolicy from './components/privacy-policy'; |
|||
import './custom.css'; |
|||
import './variables.css'; |
|||
import { ThemeSystemProvider } from './components/ThemeSystemProvider'; |
|||
import ErrorFallback from './components/ErrorFallback'; |
|||
|
|||
const container = document.getElementById('app'); |
|||
|
|||
function PPB() { |
|||
return ( |
|||
<div style={{ 'maxWidth': '500px' }}> |
|||
<div style={{ maxWidth: '500px' }}> |
|||
<img |
|||
src="https://i.imgur.com/5pXPI.jpg" |
|||
className="img-fluid" |
|||
@ -76,7 +68,10 @@ class Index extends Component<any, any> { |
|||
/> |
|||
<Route path="/login" component={Login} /> |
|||
<Route path="/create_post" component={CreatePost} /> |
|||
<Route path="/create_community" component={CreateCommunity} /> |
|||
<Route |
|||
path="/create_community" |
|||
component={CreateCommunity} |
|||
/> |
|||
<Route |
|||
path="/create_private_message" |
|||
component={CreatePrivateMessage} |
|||
@ -141,4 +136,24 @@ class Index extends Component<any, any> { |
|||
} |
|||
} |
|||
|
|||
render(<Index />, container); |
|||
// eslint-disable-next-line no-undef
|
|||
if (process.env.NODE_ENV !== 'development') { |
|||
// @ts-ignore
|
|||
// eslint-disable-next-line no-undef
|
|||
// Sentry.init({
|
|||
// dsn:
|
|||
// 'https://[email protected]/5336831',
|
|||
// });
|
|||
} |
|||
|
|||
Sentry.init({ |
|||
dsn: |
|||
'https://[email protected]/5336831', |
|||
}); |
|||
|
|||
render( |
|||
<Sentry.ErrorBoundary fallback={ErrorFallback}> |
|||
<Index /> |
|||
</Sentry.ErrorBoundary>, |
|||
container |
|||
); |
@ -1875,6 +1875,70 @@ |
|||
estree-walker "^1.0.1" |
|||
picomatch "^2.2.2" |
|||
|
|||
"@sentry/[email protected]": |
|||
version "5.22.3" |
|||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.22.3.tgz#7a64bd1cf01bf393741a3e4bf35f82aa927f5b4e" |
|||
integrity sha512-2TzE/CoBa5ZkvxJizDdi1Iz1ldmXSJpFQ1mL07PIXBjCt0Wxf+WOuFSj5IP4L40XHfJE5gU8wEvSH0VDR8nXtA== |
|||
dependencies: |
|||
"@sentry/core" "5.22.3" |
|||
"@sentry/types" "5.22.3" |
|||
"@sentry/utils" "5.22.3" |
|||
tslib "^1.9.3" |
|||
|
|||
"@sentry/[email protected]": |
|||
version "5.22.3" |
|||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.22.3.tgz#030f435f2b518f282ba8bd954dac90cd70888bd7" |
|||
integrity sha512-eGL5uUarw3o4i9QUb9JoFHnhriPpWCaqeaIBB06HUpdcvhrjoowcKZj1+WPec5lFg5XusE35vez7z/FPzmJUDw== |
|||
dependencies: |
|||
"@sentry/hub" "5.22.3" |
|||
"@sentry/minimal" "5.22.3" |
|||
"@sentry/types" "5.22.3" |
|||
"@sentry/utils" "5.22.3" |
|||
tslib "^1.9.3" |
|||
|
|||
"@sentry/[email protected]": |
|||
version "5.22.3" |
|||
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.22.3.tgz#08309a70d2ea8d5e313d05840c1711f34f2fffe5" |
|||
integrity sha512-INo47m6N5HFEs/7GMP9cqxOIt7rmRxdERunA3H2L37owjcr77MwHVeeJ9yawRS6FMtbWXplgWTyTIWIYOuqVbw== |
|||
dependencies: |
|||
"@sentry/types" "5.22.3" |
|||
"@sentry/utils" "5.22.3" |
|||
tslib "^1.9.3" |
|||
|
|||
"@sentry/[email protected]": |
|||
version "5.22.3" |
|||
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.22.3.tgz#706e4029ae5494123d3875c658ba8911aa5cc440" |
|||
integrity sha512-HoINpYnVYCpNjn2XIPIlqH5o4BAITpTljXjtAftOx6Hzj+Opjg8tR8PWliyKDvkXPpc4kXK9D6TpEDw8MO0wZA== |
|||
dependencies: |
|||
"@sentry/hub" "5.22.3" |
|||
"@sentry/types" "5.22.3" |
|||
tslib "^1.9.3" |
|||
|
|||
"@sentry/[email protected]^5.22.3": |
|||
version "5.22.3" |
|||
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-5.22.3.tgz#ed692f9e2aff718da6cd15d2941ddda4f1d63385" |
|||
integrity sha512-Or/tLayuxpOJhIWOXiDKdaJQZ981uRS9NT0QcPvU+Si1qTElSqtH1zB94GlwhgpglkbmLPiYq6VPrG2HOiZ79Q== |
|||
dependencies: |
|||
"@sentry/browser" "5.22.3" |
|||
"@sentry/minimal" "5.22.3" |
|||
"@sentry/types" "5.22.3" |
|||
"@sentry/utils" "5.22.3" |
|||
hoist-non-react-statics "^3.3.2" |
|||
tslib "^1.9.3" |
|||
|
|||
"@sentry/[email protected]": |
|||
version "5.22.3" |
|||
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.22.3.tgz#d1d547b30ee8bd7771fa893af74c4f3d71f0fd18" |
|||
integrity sha512-cv+VWK0YFgCVDvD1/HrrBWOWYG3MLuCUJRBTkV/Opdy7nkdNjhCAJQrEyMM9zX0sac8FKWKOHT0sykNh8KgmYw== |
|||
|
|||
"@sentry/[email protected]": |
|||
version "5.22.3" |
|||
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.22.3.tgz#e3bda3e789239eb16d436f768daa12829f33d18f" |
|||
integrity sha512-AHNryXMBvIkIE+GQxTlmhBXD0Ksh+5w1SwM5qi6AttH+1qjWLvV6WB4+4pvVvEoS8t5F+WaVUZPQLmCCWp6zKw== |
|||
dependencies: |
|||
"@sentry/types" "5.22.3" |
|||
tslib "^1.9.3" |
|||
|
|||
"@sinonjs/[email protected]^1.7.0": |
|||
version "1.8.1" |
|||
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" |
|||
@ -8051,7 +8115,7 @@ [email protected]^1.0.0: |
|||
minimalistic-assert "^1.0.0" |
|||
minimalistic-crypto-utils "^1.0.1" |
|||
|
|||
[email protected]^3.1.0, [email protected]^3.3.0: |
|||
[email protected]^3.1.0, [email protected]^3.3.0, [email protected]^3.3.2: |
|||
version "3.3.2" |
|||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" |
|||
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue