Skip to content

Commit

Permalink
Migrate router
Browse files Browse the repository at this point in the history
  • Loading branch information
framebassman committed May 26, 2024
1 parent 95f2eec commit 7bc5c50
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 1 deletion.
33 changes: 33 additions & 0 deletions Services/TicketStore.Web/Client/web/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"args": [
"test",
"--runInBand",
"--no-cache",
"--watchAll=false"
],
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"CI": "true"
},
}
]
}
61 changes: 61 additions & 0 deletions Services/TicketStore.Web/Client/web/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.workingDirectories": ["/src", "/tests"],
"npm.exclude": ["**/dist"],
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"typescript.tsdk": "<workspace>\\node_modules\\typescript\\lib",
"todohighlight.isEnable": true,
"todohighlight.isCaseSensitive": true,
"todohighlight.keywords": [
"OPTIMIZE:",
"HACK:",
"DEBUG:",
{
"text": "BUG:",
"color": "#ecf0f1",
"backgroundColor": "firebrick",
"isWholeLine": false,
"regex": {
"pattern": "(?<=^|\"|\\s)BUG[:]?(?!\\w)"
}
},
{
"text": "NOTE:",
"color": "#ecf0f1",
"backgroundColor": "#0BB710",
"isWholeLine": false,
"regex": {
"pattern": "(?<=^|\"|\\s)NOTE[:]?(?!\\w)"
}
}
],
"todohighlight.defaultStyle": {
"color": "#2196D2",
"backgroundColor": "none",
"cursor": "pointer"
},
"todohighlight.exclude": [
"**/.devcontainer/**",
"**/.git/**",
"**/.github/**",
"**/.vscode/**",
"**/.husky/**",
"**/coverage/**",
"**/dist/**",
"**/build/**",
"**/docs/**",
"**/http/**",
"**/node_modules/**",
],
"typescript.tsserver.maxTsServerMemory": 4072
}
4 changes: 4 additions & 0 deletions Services/TicketStore.Web/Client/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Services/TicketStore.Web/Client/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@types/react-router-dom": "^5.3.3",
"@types/redux-logger": "^3.0.13",
"babel-preset-react-app": "^10.0.1",
"eslint-config-react-app": "^7.0.1",
"formik": "^2.4.6",
"lodash": "^4.17.21",
"quagga": "^0.12.1",
Expand Down Expand Up @@ -60,5 +61,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/plugin-transform-private-property-in-object": "^7.24.6"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.centred-progress {
display: flex;
flex-direction: column;
align-items: center;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React, { ReactNode } from 'react';
import './CenteredProgress.css';
import { Box, Typography, CircularProgress } from '@mui/material';

export function CenteredProgress({ children }: { children: ReactNode }) {
return (
<div className="centred-progress">
<CircularProgress color="secondary" />
<Typography align="center" component="div">
<Box marginTop={2}>
{children}
</Box>
</Typography>
</div>
)
}
2 changes: 1 addition & 1 deletion Services/TicketStore.Web/Client/web/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import store from './store';

import './index.css';
import { YandexMetrica } from './YandexMetrica';
import reportWebVitals from './reportWebVitals';
import { WebRouter } from './WebRouter';
import reportWebVitals from './reportWebVitals';

const root = createRoot(
document.getElementById('root') as HTMLElement
Expand Down

0 comments on commit 7bc5c50

Please sign in to comment.