Skip to content

Commit

Permalink
Merge pull request #276 from healthy-food-and-dietary-products/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jsapro committed Jan 11, 2024
2 parents 65b722d + a4ae0c8 commit 99ada5d
Show file tree
Hide file tree
Showing 119 changed files with 4,482 additions and 961 deletions.
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Описание

Что делает этот Pull Request?

## Ссылка на задачу

[Название задачи](ссылка_на_задачу)
18 changes: 15 additions & 3 deletions .github/workflows/good_food_frontend_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ jobs:
check_codestyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: send start message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
${{ github.workflow }} started!
Repository: ${{ github.repository }}.
Branch name: ${{ github.ref_name }}.
Commit author: ${{ github.actor }}.
Commit message: ${{ github.event.commits[0].message }}.
- name: Use Node.js
uses: actions/setup-node@v2
with:
Expand All @@ -20,7 +32,7 @@ jobs:
npm run lint:styles
npm run lint:prettier
- name: send message
if: ${{ github.ref != 'refs/heads/develop' || github.ref != 'refs/heads/main' }}
if: ${{ github.ref != 'refs/heads/main' }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
Expand All @@ -37,7 +49,7 @@ jobs:
build_and_push_to_docker_hub:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'

steps:
- name: Check out the repo
Expand Down
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --host",
"build": "tsc && vite build",
"lint:js": "eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --cache --max-warnings 0",
"lint:js:fix": "npm run lint:js -- --fix",
Expand Down
23 changes: 14 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@ import NotFound from '@pages/not_found/not-found.tsx';
import { CartProvider } from '@contexts/cart-context.tsx';
import RecipeList from '@pages/recipe-list/index.tsx';
import Agreement from '@pages/agreement/index.tsx';

// импорт временных массивов для отображения каталогов и продуктов
// временное решение для верстки, потом удалить

// import { mainPageBlockLinks, products } from './data/dataExamples.ts';

// примеры рендера каталогов
// <CardCatalogLink title="Каталог" type="bento-grid" array={mainPageBlockLinks} />
// <CardCatalogLink title="Овощи" type="single-row" array={products} />
import DeliveryConditions from '@pages/delivery-conditions/index.tsx';
import CheckoutSuccess from '@pages/checkout/checkout-success/index.tsx';
import PaymentResults from '@pages/payment-results/index.tsx';

function App() {
const { isLoggedIn } = useAuth();
Expand All @@ -46,6 +40,7 @@ function App() {
<Route path="/catalog/:category/:id" element={<Product />} />
<Route path="/cart" element={<ShoppingCart />} />
<Route path="/cart/order" element={<Checkout />} />
<Route path="/cart/success" element={<CheckoutSuccess />} />
<Route path="/recipes" element={<RecipeList />} />
<Route path="/contacts" element={<Contacts />} />
<Route path="/recipes/:id" element={<Recipes />} />
Expand All @@ -59,6 +54,16 @@ function App() {
<Route path="favorites" element={<ProfileFavorites />} />
</Route>
<Route path={URLS.AGREEMENT} element={<Agreement />} />
<Route path={URLS.DELIVERY_COND} element={<DeliveryConditions />} />
<Route
path={'payment-is-processing'}
element={<PaymentResults isPaid={true} />}
/>
<Route
path={'payment-cancelled'}
element={<PaymentResults isPaid={false} />}
/>
<Route path="/404" element={<NotFound />} />
<Route path="*" element={<NotFound />} />
</Routes>
</Layout>
Expand Down
1 change: 1 addition & 0 deletions src/assets/images/car-alt-min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/images/cart-add-min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/chevron-right-no-stroke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/images/circle-not-ok.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/images/circle-ok-min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/images/home-alt-min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/profile/check-status.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/images/spacer-min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/star-rating-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/star-rating-outlined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/images/vspacer-min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions src/components/Button/button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
color: #fff;
font-family: $ubuntu-font;
font-size: 14px;
font-weight: 600;
font-weight: 400;
line-height: 20px;
cursor: pointer;

Expand All @@ -25,8 +25,8 @@
transition: 0.5s;

&:disabled {
background-color: black;
cursor: not-allowed;
background-color: $accent-color-lightest-green;
cursor: initial;
}
}

Expand All @@ -43,7 +43,7 @@
color: #fff;
font-family: $ubuntu-font;
font-size: 14px;
font-weight: 600;
font-weight: 400;
line-height: 20px;
cursor: pointer;
}
Expand Down Expand Up @@ -135,6 +135,7 @@
width: 100%;
height: 50px;
cursor: pointer;
white-space: nowrap;

&:not(.green-border-button__active):hover {
color: white;
Expand Down Expand Up @@ -167,6 +168,7 @@
width: 100%;
height: 50px;
transition: 0.5s;
white-space: nowrap;

@media screen and (width <= 768px) {
font-size: 13px;
Expand Down
10 changes: 7 additions & 3 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import clsx from 'clsx';
import styles from './button.module.scss';

type ButtonProps = {
export type ButtonProps = {
buttonText: string;
buttonStyle: string;
classNameActive?: string;
buttonStyle:
| 'green-border-button'
| 'green-border-button__active'
| 'greenish-button'
| 'green-button';
classNameActive?: 'greenish-button__active' | '';
onClick?: () => void;
disabled?: boolean;
classNames?: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const Breadcrumbs: React.FC<BreadcrumbsProps> = ({ productName, category }) => {
recipes: 'Рецепты',
contacts: 'Контакты',
orders: 'Мои заказы',
order: 'Оформление заказа',
};

if (category) {
Expand Down
53 changes: 0 additions & 53 deletions src/components/card-block-link/card-block-link.module.scss

This file was deleted.

25 changes: 0 additions & 25 deletions src/components/card-block-link/index.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions src/components/card-catalog-link/card-catalog-link.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,10 @@
}
}

.card-catalog-link__title-container_type_bento-grid {
margin-bottom: 28px;
}

.card-catalog-link__title-container_type_single-row {
margin-bottom: 16px;
}

.card-catalog-link__title {
margin: 0;
color: #1a1a1a;

@media screen and (width <= 768px) {
font-size: 24px;
}
}

.card-catalog-link__arrow {
width: 20px;
height: 32px;
margin-top: auto;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-image: url('@images/chevron-right.svg');
}

.card-catalog-link__list-single {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -76,30 +53,6 @@
}
}

.card-catalog-link__list-bento {
margin: 0;
padding: 0;
list-style: none;
gap: 20px;
display: grid;
grid-template-areas:
'a a b b c c'
'd d d e e e';
margin-bottom: 13px;

@media screen and (width <= 768px) {
grid-template-areas:
'a b'
'c d'
'e .';
gap: 4px;
}

&:last-of-type {
margin-bottom: 0;
}
}

.card-catalog-link__list-item {
margin: 0;
padding: 0;
Expand Down
Loading

0 comments on commit 99ada5d

Please sign in to comment.