diff --git a/.stylelintignore b/.stylelintignore index c2658d7d..8d87b1d2 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1 +1 @@ -node_modules/ +node_modules/* diff --git a/package.json b/package.json index 589adf92..5a4168e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixabayfinder", - "version": "0.1.53", + "version": "0.1.54", "types": "src/types/global.d.ts", "private": "true", "license": "MIT", @@ -27,20 +27,20 @@ "@reduxjs/toolkit": "^2.2.7", "@testing-library/jest-dom": "^6.5.0", "@types/eslint": "^9.6.1", - "@types/jest": "^29.5.12", - "@types/react": "^18.3.5", + "@types/jest": "^29.5.13", + "@types/react": "^18.3.7", "@types/react-dom": "^18.3.0", "@types/react-redux": "^7.1.33", - "@typescript-eslint/eslint-plugin": "8.3.0", - "@typescript-eslint/parser": "^8.2.0", + "@typescript-eslint/eslint-plugin": "8.5.0", + "@typescript-eslint/parser": "^8.5.0", "@vitejs/plugin-react": "^4.3.1", "axios": "1.7.7", - "eslint": "9.9.1", + "eslint": "9.10.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-html": "^8.1.1", "eslint-plugin-prettier": "^5.2.1", "fs": "^0.0.1-security", - "husky": "^9.1.5", + "husky": "^9.1.6", "jest": "^29.7.0", "prettier": "^3.3.3", "react": "^18.3.1", @@ -50,13 +50,13 @@ "react-toastify": "^10.0.5", "redux": "^5.0.1", "sal.js": "^0.8.5", - "styled-components": "^6.1.12", + "styled-components": "^6.1.13", "stylelint": "^16.9.0", "stylelint-config-standard": "^36.0.1", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typescript": "^5.5.4", - "vite": "^5.4.3" + "typescript": "4.7.4", + "vite": "^5.4.6" }, "scripts": { "build": "vite build", @@ -64,7 +64,7 @@ "prebuild": "rm -rf dist", "preview": "vite preview", "test": "jest --watchAll", - "lint": "eslint .", + "lint": "eslint . && stylelint **/*.css", "format": "prettier -w .", "eject": "vite eject", "setup": "yarn --silent --ignore-scripts", @@ -92,12 +92,12 @@ }, "devDependencies": { "@eslint/compat": "^1.1.1", - "@eslint/js": "^9.9.1", + "@eslint/js": "^9.10.0", "@testing-library/react": "^16.0.1", - "@types/node": "^22.5.3", - "eslint-plugin-react": "^7.35.2", + "@types/node": "^22.5.5", + "eslint-plugin-react": "^7.36.1", "react-test-renderer": "^18.3.1", - "typescript-eslint": "^8.4.0", + "typescript-eslint": "^8.6.0", "vite-plugin-environment": "^1.1.3" } } diff --git a/src/api/index.ts b/src/api/index.ts index 2cce024a..0bb70f88 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,2 +1 @@ export * from './apiDocs'; -export * from './request'; diff --git a/src/api/request.ts b/src/api/request.ts deleted file mode 100644 index 71b263d2..00000000 --- a/src/api/request.ts +++ /dev/null @@ -1,45 +0,0 @@ -import axios from 'axios'; -import { PixabayBaseURL } from '../utils'; - -const globalHeader: string = 'application/json'; -axios.defaults.baseURL = PixabayBaseURL; - -axios.defaults.headers.common['Content-Type'] = globalHeader; - -/** - * Request object to manipulate api. - * @param {{ get: Promise, post: Promise, put: Promise, delete: Promise }} Request - */ -export const request = { - get: async ( - url: string, - headers?: Record - ): Promise => { - const { data } = await axios.get(url, headers); - return data; - }, - - post: async ( - url: string, - redata: unknown, - headers?: { headers: Record } - ): Promise => { - const { data } = await axios.post(`${url}`, redata, headers); - return data; - }, - - put: async ( - url: string, - redata: unknown, - headers?: { headers: Record } - ): Promise => { - await axios.put(`${url}`, redata, headers); - }, - - delete: async ( - url: string, - headers?: { headers: Record } - ): Promise => { - await axios.delete(`${url}`, headers); - }, -}; diff --git a/src/app/Layout.tsx b/src/app/Layout.tsx index c46bbcb9..67f3906e 100644 --- a/src/app/Layout.tsx +++ b/src/app/Layout.tsx @@ -2,17 +2,18 @@ import { List, SearchFormComp } from '../containers'; import React from 'react'; import { Flip, ToastContainer } from 'react-toastify'; import { Container } from '../styles'; -import { MainFooter } from '../ui'; +import Header from '../inc/Header'; +import Footer from '../inc/Footer'; const Layout: React.FC = () => { return ( +
+

PixaBay Finder

- - Created by Fadi Hanna - +