Upgrade packages, use cloudfront for data.json

This commit is contained in:
2019-06-08 10:49:28 -07:00
parent bd4d21b065
commit a6f73e7b45
4 changed files with 813 additions and 717 deletions

View File

@@ -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)

View File

@@ -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[];