File tree Expand file tree Collapse file tree 12 files changed +468
-39
lines changed Expand file tree Collapse file tree 12 files changed +468
-39
lines changed Original file line number Diff line number Diff line change 11REACT_APP_BACKEND_URL_DEV = ' dev.demosite.com/api'
2- REACT_APP_BACKEND_URL_PROD = ' www.demosite.com/api'
2+ REACT_APP_BACKEND_URL_PROD = ' www.demosite.com/api'
3+ REACT_APP_BACKEND_SENTRY_DSN = ' sentry-dsn-url'
Original file line number Diff line number Diff line change 66 "@ant-design/icons" : " ^4.4.0" ,
77 "@craco/craco" : " ^6.1.0" ,
88 "@reduxjs/toolkit" : " ^1.5.0" ,
9+ "@sentry/react" : " ^6.2.4" ,
10+ "@sentry/tracing" : " ^6.2.4" ,
911 "@testing-library/jest-dom" : " ^5.11.9" ,
1012 "@testing-library/react" : " ^11.2.3" ,
1113 "@testing-library/user-event" : " ^12.6.2" ,
6769 "eslint-plugin-react-hooks" : " 4.2.0" ,
6870 "husky" : " ^4.3.8" ,
6971 "prettier" : " ^2.2.1" ,
72+ "serve" : " ^11.3.2" ,
7073 "source-map-explorer" : " ^2.5.2"
7174 },
7275 "husky" : {
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { ThemeProvider } from 'styled-components' ;
3+ import { ConfigProvider } from 'antd' ;
4+ import { IntlProvider } from 'react-intl' ;
5+ import PropTypes from 'prop-types' ;
6+ import { theme , AppLocale } from 'config' ;
7+ import { useSelector } from 'react-redux' ;
8+ import { ErrorBoundary } from '@sentry/react' ;
9+ import { ErrorFallback } from 'components' ;
10+
11+ export default function AppProvider ( { children } ) {
12+ const { locale } = useSelector ( state => state . LanguageSwitcher . language ) ;
13+
14+ const currentAppLocale = AppLocale [ locale ] ;
15+
16+ return (
17+ < ErrorBoundary
18+ fallback = { ( { error, componentStack, resetError } ) => (
19+ < ErrorFallback error = { { error, componentStack, resetError } } />
20+ ) }
21+ showDialog
22+ >
23+ < ConfigProvider locale = { currentAppLocale . antd } >
24+ < IntlProvider
25+ locale = { currentAppLocale . locale }
26+ messages = { currentAppLocale . messages }
27+ >
28+ < ThemeProvider theme = { theme } > { children } </ ThemeProvider >
29+ </ IntlProvider >
30+ </ ConfigProvider >
31+ </ ErrorBoundary >
32+ ) ;
33+ }
34+
35+ AppProvider . propTypes = {
36+ children : PropTypes . node . isRequired ,
37+ } ;
Original file line number Diff line number Diff line change 1+ import { Result } from 'antd' ;
2+ import React from 'react' ;
3+ import PropTypes from 'prop-types' ;
4+
5+ function ErrorFallback ( { error } ) {
6+ return (
7+ < Result
8+ status = "500"
9+ title = "500"
10+ subTitle = {
11+ < >
12+ < div > Sorry, something went wrong!</ div >
13+ < div > { error ?. error . toString ( ) } </ div >
14+ < div > { error ?. componentStack } </ div >
15+ </ >
16+ }
17+ />
18+ ) ;
19+ }
20+
21+ ErrorFallback . propTypes = {
22+ error : PropTypes . object ,
23+ } ;
24+
25+ export default ErrorFallback ;
Original file line number Diff line number Diff line change 1- export { default as AppProvider } from './wrapper/AppProvider' ;
1+ export { default as AppProvider } from './AppProvider' ;
2+ export { default as ErrorFallback } from './ErrorFallback' ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11export default {
22 siteName : 'Dashboard Boilerplate' ,
33 defaultLanguage : 'english' ,
4+ sentryDSN : process . env . REACT_APP_BACKEND_SENTRY_DSN ,
45} ;
Original file line number Diff line number Diff line change 1818 "Dashboard" : " ড্যাশবোর্ড" ,
1919 "Settings" : " সেটিংস" ,
2020 "Logout" : " প্রস্থান" ,
21- "Successfully logged in!" : " সফলভাবে লগ ইন হয়েছে!"
21+ "Successfully logged in!" : " সফলভাবে লগ ইন হয়েছে!" ,
22+ "Sorry, something went wrong!" : " দুঃখিত, কিছু ভুল হয়েছে!"
2223}
Original file line number Diff line number Diff line change 1818 "Dashboard" : " Dashboard" ,
1919 "Settings" : " Settings" ,
2020 "Logout" : " Logout" ,
21- "Successfully logged in!" : " Successfully logged in!"
21+ "Successfully logged in!" : " Successfully logged in!" ,
22+ "Sorry, something went wrong!" : " Sorry, something went wrong!"
2223}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function UserAuthForm() {
3030 validateMessages = { getValidateMessages ( messages , 'name' ) }
3131 >
3232 < Form . Item
33- className = "mb-1 "
33+ className = "mb-3 "
3434 name = "email"
3535 rules = { [ { required : true } , { type : 'email' } ] }
3636 hasFeedback
You can’t perform that action at this time.
0 commit comments