Upgrade packages, use cloudfront for data.json
This commit is contained in:
1502
package-lock.json
generated
1502
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -10,22 +10,22 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "."
|
||||
"url": "git@git.frat.tech:aaron/ski.git"
|
||||
},
|
||||
"author": "Aaron Gutierrez",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/react": "^16.7.18",
|
||||
"@types/react-dom": "^16.0.11",
|
||||
"react": "^16.7.0",
|
||||
"react-dom": "^16.7.0"
|
||||
"@types/react": "^16.8.19",
|
||||
"@types/react-dom": "^16.8.4",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"awesome-typescript-loader": "^5.2.1",
|
||||
"source-map-loader": "^0.2.4",
|
||||
"typescript": "^3.2.2",
|
||||
"webpack": "^4.28.2",
|
||||
"webpack-cli": "^3.3.0",
|
||||
"webpack-dev-server": "^3.1.14"
|
||||
"typescript": "^3.5.1",
|
||||
"webpack": "^4.33.0",
|
||||
"webpack-cli": "^3.3.3",
|
||||
"webpack-dev-server": "^3.7.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Root extends React.PureComponent<Props, State> {
|
||||
window.outerWidth,
|
||||
document.getElementById("mount")!.clientWidth
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
state: State = {
|
||||
gridHeights: [],
|
||||
@@ -42,7 +42,7 @@ export class Root extends React.PureComponent<Props, State> {
|
||||
|
||||
componentDidMount() {
|
||||
window
|
||||
.fetch(Model.dataUrl())
|
||||
.fetch(Model.dataUrl)
|
||||
.then(data => data.json())
|
||||
.then(json => this.setState({ data: json }))
|
||||
.then(this._loadHash)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
export const SIZES = [1600, 1200, 800, 600, 400, 200];
|
||||
|
||||
export function dataUrl() {
|
||||
return window.location.host === "ski.aarongutierrez.com"
|
||||
? "https://s3-us-west-2.amazonaws.com/ski.aarongutierrez.com/img/data.json"
|
||||
: "img/data.json";
|
||||
}
|
||||
export const dataUrl = "img/data.json";
|
||||
|
||||
export interface Data {
|
||||
sets: ImageSet[];
|
||||
|
||||
Reference in New Issue
Block a user