Skip to content

Commit 56cd629

Browse files
committed
initial-commit
1 parent 8896458 commit 56cd629

File tree

28 files changed

+657
-3159
lines changed

28 files changed

+657
-3159
lines changed

package-lock.json

Lines changed: 228 additions & 2597 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,13 @@
6060
"@types/react-dom": "18.0.6",
6161
"@types/react-window": "1.8.5",
6262
"@types/uuid": "8.3.4",
63+
"appwrite": "10.2.0",
6364
"clsx": "1.2.1",
6465
"dayjs": "1.11.5",
6566
"history": "5.3.0",
67+
"lodash": "4.17.21",
6668
"mobx": "6.6.2",
6769
"mobx-react": "7.5.3",
68-
"msw": "0.47.3",
69-
"node-appwrite": "8.2.0",
70-
"notistack": "2.0.5",
7170
"path-to-regexp": "6.2.0",
7271
"react": "18.2.0",
7372
"react-declarative": "2.2.4",

template.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"package": {
3-
"scripts": {
4-
"msw-init": "npx msw init public/ --save"
5-
},
63
"devDependencies": {
74
"@types/uuid": "8.3.4",
85
"@types/node": "16.11.51",
@@ -26,12 +23,11 @@
2623
"react-declarative": "2.2.4",
2724
"resize-observer-polyfill": "1.5.1",
2825
"react-window": "1.8.7",
29-
"node-appwrite": "8.2.0",
26+
"appwrite": "10.2.0",
3027
"mobx": "6.6.2",
3128
"mobx-react": "7.5.3",
3229
"uuid": "9.0.0",
33-
"msw": "0.47.3",
34-
"notistack": "2.0.5",
30+
"lodash": "4.17.21",
3531
"clsx": "1.2.1"
3632
},
3733
"eslintConfig": {

template/public/mockServiceWorker.js

Lines changed: 0 additions & 303 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import * as React from 'react';
2+
3+
import { observer } from "mobx-react";
4+
5+
import Snackbar from "@mui/material/Snackbar";
6+
7+
import ioc from '../lib/ioc';
8+
9+
const AUTO_HIDE_DURATION = 5000;
10+
11+
interface IAlertProviderProps {
12+
children: React.ReactChild;
13+
}
14+
15+
export const AlertProvider = observer(({
16+
children,
17+
}: IAlertProviderProps) => {
18+
const { current } = ioc.alertService;
19+
return (
20+
<>
21+
{!!current && (
22+
<Snackbar
23+
open
24+
key={current.key}
25+
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
26+
autoHideDuration={AUTO_HIDE_DURATION}
27+
onClose={ioc.alertService.hideCurrent}
28+
sx={{ zIndex: 99999 }}
29+
message={current.message}
30+
/>
31+
)}
32+
{children}
33+
</>
34+
);
35+
});
36+
37+
export default AlertProvider;

0 commit comments

Comments
 (0)