Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
Full-Stack
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Нұрасыл Қайратұлы
Full-Stack
Commits
c97e2e91
Commit
c97e2e91
authored
Jul 16, 2024
by
Nurasyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pret
parent
858c3faa
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
53 additions
and
47 deletions
+53
-47
.prettierrc
Frontend/.prettierrc
+7
-0
.prettierrc.cjs
Frontend/.prettierrc.cjs
+0
-7
settings.json
Frontend/.vscode/settings.json
+3
-8
package.json
Frontend/package.json
+2
-1
AppToolbar.tsx
Frontend/src/components/UI/AppToolbar/AppToolbar.tsx
+23
-0
productsSlice.ts
Frontend/src/features/productsSlice.ts
+6
-8
index.css
Frontend/src/index.css
+3
-6
index.ts
Frontend/src/store/index.ts
+2
-2
tsconfig.json
Frontend/tsconfig.json
+4
-12
vite.config.ts
Frontend/vite.config.ts
+3
-3
No files found.
Frontend/.prettierrc
0 → 100644
View file @
c97e2e91
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 100,
"useTabs": false
}
Frontend/.prettierrc.cjs
deleted
100644 → 0
View file @
858c3faa
module.exports = {
tabWidth: 2,
singleQuote: true,
trailingComma: 'es5',
printWidth: 100,
useTabs: false,
};
Frontend/.vscode/settings.json
View file @
c97e2e91
...
...
@@ -10,11 +10,6 @@
"[typescriptreact]"
:
{
"editor.formatOnSave"
:
true
},
"eslint.validate"
:
[
"javascript"
,
"javascriptreact"
,
"typescript"
,
"typescriptreact"
],
"typescript.tsdk"
:
"node_modules/typescript/lib"
,
}
\ No newline at end of file
"eslint.validate"
:
[
"javascript"
,
"javascriptreact"
,
"typescript"
,
"typescriptreact"
],
"typescript.tsdk"
:
"node_modules/typescript/lib"
}
Frontend/package.json
View file @
c97e2e91
...
...
@@ -7,7 +7,8 @@
"dev"
:
"vite"
,
"build"
:
"tsc && vite build"
,
"lint"
:
"eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
,
"preview"
:
"vite preview"
"preview"
:
"vite preview"
,
"format"
:
"prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc"
},
"dependencies"
:
{
"@emotion/react"
:
"^11.11.1"
,
...
...
Frontend/src/components/UI/AppToolbar/AppToolbar.tsx
0 → 100644
View file @
c97e2e91
import
{
AppBar
,
Box
,
Toolbar
,
Typography
,
styled
}
from
'@mui/material'
;
import
{
Link
}
from
'react-router-dom'
;
const
StyledLink
=
styled
(
Link
)(()
=>
({
color
:
'inherit'
,
textDecoration
:
'none'
,
[
'&:hover'
]:
{
color
:
'inherit'
},
}));
export
function
AppToolbar
()
{
return
(
<>
<
AppBar
position=
"fixed"
>
<
Toolbar
>
<
Typography
variant=
"h6"
component=
{
StyledLink
}
to=
{
'/'
}
>
Computer parts shop
</
Typography
>
</
Toolbar
>
</
AppBar
>
<
Box
component=
{
Toolbar
}
marginBottom=
{
2
}
/>
</>
);
}
Frontend/src/features/productsSlice.ts
View file @
c97e2e91
import
{
createSlice
}
from
"@reduxjs/toolkit"
;
import
{
createSlice
}
from
'@reduxjs/toolkit'
;
const
initialState
=
{};
const
productsSlice
=
createSlice
(
{
name
:
'products'
,
initialState
,
reducers
:
{},
}
)
const
productsSlice
=
createSlice
({
name
:
'products'
,
initialState
,
reducers
:
{},
});
export
default
productsSlice
.
reducer
;
Frontend/src/index.css
View file @
c97e2e91
body
{
margin
:
0
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
'Segoe UI'
,
'Roboto'
,
'Oxygen'
,
'Ubuntu'
,
'Cantarell'
,
'Fira Sans'
,
'Droid Sans'
,
'Helvetica Neue'
,
sans-serif
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
'Segoe UI'
,
'Roboto'
,
'Oxygen'
,
'Ubuntu'
,
'Cantarell'
,
'Fira Sans'
,
'Droid Sans'
,
'Helvetica Neue'
,
sans-serif
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
}
code
{
font-family
:
source-code-pro
,
Menlo
,
Monaco
,
Consolas
,
'Courier New'
,
monospace
;
font-family
:
source-code-pro
,
Menlo
,
Monaco
,
Consolas
,
'Courier New'
,
monospace
;
}
Frontend/src/store/index.ts
View file @
c97e2e91
...
...
@@ -4,7 +4,7 @@ import productsReducer from '../features/productsSlice.ts';
const
store
=
configureStore
({
reducer
:
{
products
:
productsReducer
,
}
})
}
,
})
;
export
default
store
;
Frontend/tsconfig.json
View file @
c97e2e91
...
...
@@ -2,11 +2,7 @@
"compilerOptions"
:
{
"target"
:
"ES2020"
,
"useDefineForClassFields"
:
true
,
"lib"
:
[
"ES2020"
,
"DOM"
,
"DOM.Iterable"
],
"lib"
:
[
"ES2020"
,
"DOM"
,
"DOM.Iterable"
],
"module"
:
"ESNext"
,
"skipLibCheck"
:
true
,
/*
Bundler
mode
*/
...
...
@@ -22,17 +18,13 @@
"noUnusedParameters"
:
true
,
"noFallthroughCasesInSwitch"
:
true
,
"paths"
:
{
"@/*"
:
[
"./src/*"
]
"@/*"
:
[
"./src/*"
]
}
},
"include"
:
[
"src"
],
"include"
:
[
"src"
],
"references"
:
[
{
"path"
:
"./tsconfig.node.json"
}
]
}
\ No newline at end of file
}
Frontend/vite.config.ts
View file @
c97e2e91
import
{
defineConfig
}
from
'vite'
import
react
from
'@vitejs/plugin-react-swc'
import
{
defineConfig
}
from
'vite'
;
import
react
from
'@vitejs/plugin-react-swc'
;
// https://vitejs.dev/config/
export
default
defineConfig
({
plugins
:
[
react
()],
})
})
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment