Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stellar Burgers #26

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example

This file was deleted.

40 changes: 0 additions & 40 deletions .storybook/main.ts

This file was deleted.

26 changes: 0 additions & 26 deletions .storybook/preview.tsx

This file was deleted.

18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
# x курс
# Фамилия Имя Отчество

# Проектная работа 11-го спринта

# Дробышев Дмитрий Игоревич

[Макет](<https://www.figma.com/file/vIywAvqfkOIRWGOkfOnReY/React-Fullstack_-Проектные-задачи-(3-месяца)_external_link?type=design&node-id=0-1&mode=design>)

[Чеклист](https://www.notion.so/praktikum/0527c10b723d4873aa75686bad54b32e?pvs=4)

## Этапы работы:

1. Разверните проект и ознакомьтесь с кодом. Все необходимые вам компоненты уже созданы и лежат в папке `src/components`

2. Настройте роутинг.

3. Напишите функционал запросов данных с сервера, используя `Redux` и глобальный `store`. Сами "ручки" уже прописаны и лежат в `utils/burger-api.ts`

4. Настройте авторизацию и создайте защищённые роуты.

## Важно:

Для корректной работы запросов к серверу необходимо добавить переменную BURGER_API_URL в окружение. Сама ссылка находится в файле `.env.example`.
106 changes: 81 additions & 25 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"react-dom": "^18.2.0",
"react-intersection-observer": "^9.4.3",
"react-redux": "^9.1.0",
"react-router-dom": "^6.10.0",
"react-router-dom": "^6.28.0",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"typescript": "^5.3.3",
"uuid": "^9.0.0",
Expand Down Expand Up @@ -47,6 +48,7 @@
"@types/node": "^20.10.5",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"@types/react-router-dom": "^5.3.3",
"@types/react-test-renderer": "^18.0.7",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.15.0",
Expand Down
7 changes: 6 additions & 1 deletion src/components/app-header/app-header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { FC } from 'react';
import { AppHeaderUI } from '@ui';
import { useSelector } from '../../services/store';
import { getName } from '../../services/slices/user-slice';

export const AppHeader: FC = () => <AppHeaderUI userName='' />;
export const AppHeader: FC = () => {
const userName = useSelector(getName);
return <AppHeaderUI userName={userName} />;
};
Loading