From d49eb4df33b3a20e2878832f08bc74be3de4e268 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Fri, 14 Oct 2022 01:59:24 +0530 Subject: [PATCH] chore: cleanup --- .../components/RequestTabs/StyledWrapper.js | 10 -- .../bruno-app/src/providers/Store/index.js | 103 ------------------ .../bruno-app/src/providers/Store/reducer.js | 64 ----------- 3 files changed, 177 deletions(-) delete mode 100644 packages/bruno-app/src/providers/Store/index.js delete mode 100644 packages/bruno-app/src/providers/Store/reducer.js diff --git a/packages/bruno-app/src/components/RequestTabs/StyledWrapper.js b/packages/bruno-app/src/components/RequestTabs/StyledWrapper.js index f6cb4c48b..ea8951afe 100644 --- a/packages/bruno-app/src/components/RequestTabs/StyledWrapper.js +++ b/packages/bruno-app/src/components/RequestTabs/StyledWrapper.js @@ -93,16 +93,6 @@ const Wrapper = styled.div` } } } - - &.has-chevrons { - ul { - li:first-child { - .tab-container { - border-left: 1px solid #dcdcdc; - } - } - } - } `; export default Wrapper; diff --git a/packages/bruno-app/src/providers/Store/index.js b/packages/bruno-app/src/providers/Store/index.js deleted file mode 100644 index a9b4846ca..000000000 --- a/packages/bruno-app/src/providers/Store/index.js +++ /dev/null @@ -1,103 +0,0 @@ -const collection = { - "id": uuid(), - "name": "spacex", - "items": [ - { - "id": uuid(), - "name": "Launches", - "depth": 1, - "items": [ - { - "id": uuid(), - "depth": 2, - "name": "Capsules", - "request": { - "type": "graphql", - "url": "https://api.spacex.land/graphql/", - "method": "POST", - "headers": [], - "body": { - "mimeType": "application/graphql", - "graphql": { - "query": "{\n launchesPast(limit: 10) {\n mission_name\n launch_date_local\n launch_site {\n site_name_long\n }\n links {\n article_link\n video_link\n }\n rocket {\n rocket_name\n first_stage {\n cores {\n flight\n core {\n reuse_count\n status\n }\n }\n }\n second_stage {\n payloads {\n payload_type\n payload_mass_kg\n payload_mass_lbs\n }\n }\n }\n ships {\n name\n home_port\n image\n }\n }\n}", - "variables": "" - } - } - }, - "response": null - }, - { - "id": uuid(), - "depth": 2, - "name": "Missions", - "request": { - "type": "graphql", - "url": "https://api.spacex.land/graphql/", - "method": "POST", - "headers": [], - "body": { - "mimeType": "application/graphql", - "graphql": { - "query": "{\n launches {\n launch_site {\n site_id\n site_name\n }\n launch_success\n }\n}", - "variables": "" - } - } - }, - "response": null - } - ] - } - ] -}; - -const collection2 = { - "id": uuid(), - "name": "notebase", - "items": [ - { - "id": uuid(), - "name": "Notes", - "depth": 1, - "items": [ - { - "id": uuid(), - "depth": 2, - "name": "Create", - "request": { - "type": "graphql", - "url": "https://api.spacex.land/graphql/", - "method": "POST", - "headers": [], - "body": { - "mimeType": "application/graphql", - "graphql": { - "query": "{\n launchesPast(limit: 10) {\n mission_name\n launch_date_local\n launch_site {\n site_name_long\n }\n links {\n article_link\n video_link\n }\n rocket {\n rocket_name\n first_stage {\n cores {\n flight\n core {\n reuse_count\n status\n }\n }\n }\n second_stage {\n payloads {\n payload_type\n payload_mass_kg\n payload_mass_lbs\n }\n }\n }\n ships {\n name\n home_port\n image\n }\n }\n}", - "variables": "" - } - } - }, - "response": null - }, - { - "id": uuid(), - "depth": 2, - "name": "Update", - "request": { - "type": "graphql", - "url": "https://api.spacex.land/graphql/", - "method": "POST", - "headers": [], - "body": { - "mimeType": "application/graphql", - "graphql": { - "query": "{\n launches {\n launch_site {\n site_id\n site_name\n }\n launch_success\n }\n}", - "variables": "" - } - } - }, - "response": null - } - ] - } - ] -}; \ No newline at end of file diff --git a/packages/bruno-app/src/providers/Store/reducer.js b/packages/bruno-app/src/providers/Store/reducer.js deleted file mode 100644 index 34264f2fb..000000000 --- a/packages/bruno-app/src/providers/Store/reducer.js +++ /dev/null @@ -1,64 +0,0 @@ -import produce from 'immer'; -import union from 'lodash/union'; -import find from 'lodash/find'; -import actions from './actions'; -import { - flattenItems, - findItem, - cloneItem, - updateRequestTabAsChanged, - findCollectionByUid -} from './utils'; - -const reducer = (state, action) => { - switch (action.type) { - case actions.IDB_CONNECTION_READY: { - return produce(state, (draft) => { - draft.idbConnection = action.connection; - }); - } - - case actions.REQUEST_GQL_QUERY_CHANGED: { - return produce(state, (draft) => { - const collection = findCollectionByUid(draft.collections, action.collectionUid); - - if(collection) { - let flattenedItems = flattenItems(collection.items); - let item = findItem(flattenedItems, action.requestTab.id); - - if(item) { - item.request.body.graphql.query = action.query; - } - } - }); - } - - case actions.ADD_NEW_GQL_REQUEST: { - return produce(state, (draft) => { - const uid = uuid(); - draft.requestTabs.push({ - uid: uid, - name: 'New Tab', - type: 'graphql', - request: { - method: 'GET', - url: 'https://api.spacex.land/graphql/', - body: { - graphql: { - query: '{}' - } - } - }, - collectionUid: null - }); - draft.activeRequestTabUid = uid; - }); - } - - default: { - return state; - } - } -} - -export default reducer; \ No newline at end of file