Skip to content

Commit

Permalink
final version
Browse files Browse the repository at this point in the history
  • Loading branch information
lorencerri committed Feb 2, 2021
1 parent 9f11875 commit 8621b69
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\App.js":"1","C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\index.js":"2","C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\Components\\Header.js":"3"},{"size":161,"mtime":1612216895143,"results":"4","hashOfConfig":"5"},{"size":216,"mtime":1612216073478,"results":"6","hashOfConfig":"5"},{"size":449,"mtime":1612218265772,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"10"},"18opz5d",{"filePath":"11","messages":"12","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"10"},{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\App.js",[],["15","16","17","18","19"],"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\index.js",[],"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\Components\\Header.js",[],{"ruleId":"20","replacedBy":"21"},{"ruleId":"22","replacedBy":"23"},{"ruleId":"24","replacedBy":"25"},{"ruleId":"26","replacedBy":"27"},{"ruleId":"28","replacedBy":"29"},"lines-around-directive",["30"],"global-require",[],"no-buffer-constructor",[],"no-new-require",[],"no-path-concat",[],"padding-line-between-statements"]
[{"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\App.js":"1","C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\index.js":"2","C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\Components\\Header.js":"3","C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\Components\\Content.js":"4"},{"size":591,"mtime":1612231944551,"results":"5","hashOfConfig":"6"},{"size":216,"mtime":1612216073478,"results":"7","hashOfConfig":"6"},{"size":449,"mtime":1612218412467,"results":"8","hashOfConfig":"6"},{"size":1364,"mtime":1612231958190,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"18opz5d",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"14"},{"filePath":"15","messages":"16","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"14"},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\App.js",[],"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\index.js",[],["19","20","21","22","23"],"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\Components\\Header.js",[],"C:\\Users\\loren\\Documents\\GitHub\\csgo-inventory-creator\\src\\Components\\Content.js",[],{"ruleId":"24","replacedBy":"25"},{"ruleId":"26","replacedBy":"27"},{"ruleId":"28","replacedBy":"29"},{"ruleId":"30","replacedBy":"31"},{"ruleId":"32","replacedBy":"33"},"lines-around-directive",["34"],"global-require",[],"no-buffer-constructor",[],"no-new-require",[],"no-path-concat",[],"padding-line-between-statements"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# csgo-inventory-creator

**Project Abandoned**, here's a screenshot in its current, unfinished state: ![](https://i.plexidev.org/yXJ6lKc)
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"@babel/helper-builder-react-jsx": "^7.10.4",
"bootstrap": "^4.6.0",
"node-sass": "4.14.1",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-bootstrap": "^1.4.3",
"react-bootstrap-slider": "^3.0.0",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1"
},
Expand Down
24 changes: 22 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
import './App.css';

import { useState, useEffect } from 'react';
// import SteamMarketFetcher from 'steam-market-fetcher';

import { Header } from './Components/Header';
import { Content } from './Components/Content';

const App = () => {
console.log('Running...');
const [state, setState] = useState({});

useEffect(() => {
const fetchMarketInfo = () => {
// TODO: Fetch CS:GO Items
// Limitations: You can't fetch enough items before Steam ratelimits you.
setState({});
};

fetchMarketInfo();
});

return <Header />;
console.log(state);
return (
<>
<Header />
<Content />
</>
);
};

export default App;
65 changes: 65 additions & 0 deletions src/Components/Content.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import {
Jumbotron,
Container,
Table,
Navbar,
Nav,
Form,
} from 'react-bootstrap';

import weapons from '../Data/weapons.json';

export const Content = () => {
console.log(weapons);

return (
<Jumbotron fluid style={{ margin: 0 }}>
<Container>
<Navbar bg='dark' variant='dark'>
<Navbar.Brand href='#home'>CSGO Items</Navbar.Brand>
<Nav className='mr-auto' />
<Navbar.Collapse className='justify-content-end'>
<Navbar.Text>
Total: <span style={{ color: 'white' }}>$XX</span>
</Navbar.Text>
</Navbar.Collapse>
</Navbar>
<Table striped bordered>
<thead>
<tr>
<th>Weapon</th>
<th>Skin</th>
<th>Price</th>
</tr>
</thead>
<tbody>
{Object.keys(weapons).map(category => (
<>
<tr>
<td colSpan='3'>
<b>{category}</b>
</td>
</tr>
{Object.keys(weapons[category]).map(weapon => (
<tr>
<td>{weapon}</td>
<td>
<Form.Control
size='sm'
type='text'
placeholder='Skin'
/>
</td>
<td>
<b>$XX</b>
</td>
</tr>
))}
</>
))}
</tbody>
</Table>
</Container>
</Jumbotron>
);
};
54 changes: 54 additions & 0 deletions src/Data/weapons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"Pistol": {
"Glock-18": { "default": true },
"USP-S": { "default": true },
"P2000": { "default": false },
"Dual Berettas": { "default": true },
"P250": { "default": true },
"Tec-9": { "default": true },
"Five-SeveN": { "default": true },
"CZ75-Auto": { "default": false },
"Desert Eagle": { "default": true },
"R8 Revolver": { "default": false }
},
"SMG": {
"MAC-10": { "default": true },
"MP9": { "default": true },
"MP7": { "default": true },
"MP5-SD": { "default": false },
"UMP-45": { "default": true },
"P90": { "default": true },
"PP-Bizon": { "default": true }
},
"Rifle": {
"Galil AR": { "default": true },
"FAMAS": { "default": true },
"AK-47": { "default": true },
"M4A4": { "default": true },
"M4A1-S": { "default": false },
"SSG 08": { "default": true },
"SG 553": { "default": true },
"AUG": { "default": true },
"AWP": { "default": true },
"G3SG1": { "default": true },
"SCAR-20": { "default": true }
},
"Heavy": {
"Nova": { "default": true },
"XM1014": { "default": true },
"Sawed-Off": { "default": true },
"MAG-7": { "default": true },
"M249": { "default": true },
"Negev": { "default": true }
},
"Melee": {
"Knife": { "default": false }
},
"Gloves": {
"Gloves": { "default": false }
},
"Agents": {
"Local T Agent": { "default": false },
"Local CT Agent": { "default": false }
}
}
1 change: 1 addition & 0 deletions src/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ $body-bg: #313131;
$font-family-base: 'Karla', sans-serif;

@import '~bootstrap/scss/bootstrap.scss';
@import '~bootstrap-slider/dist/css/bootstrap-slider.css';
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2799,6 +2799,11 @@ boolbase@^1.0.0, boolbase@~1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=

bootstrap-slider@^11.0.2:
version "11.0.2"
resolved "https://registry.yarnpkg.com/bootstrap-slider/-/bootstrap-slider-11.0.2.tgz#4b167c165f322339cc66f0c7166b5a39e289e251"
integrity sha512-CdwS+Z6X79OkLes9RfDgPB9UIY/+81wTkm6ktdSB6hdyiRbjJLFQIjZdnEr55tDyXZfgC7U6yeSXkNN9ZdGqjA==

bootstrap@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.6.0.tgz#97b9f29ac98f98dfa43bf7468262d84392552fd7"
Expand Down Expand Up @@ -9400,6 +9405,13 @@ react-app-polyfill@^2.0.0:
regenerator-runtime "^0.13.7"
whatwg-fetch "^3.4.1"

react-bootstrap-slider@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-bootstrap-slider/-/react-bootstrap-slider-3.0.0.tgz#f47bc448ad1c6095e9cd59278150291204c60dbb"
integrity sha512-Sl5g/J1KW/byU+4Io/W/CUNxxWZahNs8uQcAgE+27XQJ4njfSFZQ3NYY55vy1aFeoU8Kkmnrq+CG5gix6L8Kvw==
dependencies:
bootstrap-slider "^11.0.2"

react-bootstrap@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/react-bootstrap/-/react-bootstrap-1.4.3.tgz#9a76a66800b57f422dd824c9dbe4c9dcef634790"
Expand Down

0 comments on commit 8621b69

Please sign in to comment.