Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Changed vars and some titles #11

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"typescript": "3.7.2"
},
"scripts": {
"start": "react-scripts start",
"start": "HOST=0.0.0.0 react-scripts start",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this necessary? seems to start fine on localhost for me

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah just saw your other issue. disregard :)

"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
Expand Down
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>IPFS Photo Gallery</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand All @@ -40,4 +40,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "InterPlanetary Gallery",
"name": "IPFS Photo Gallery",
"icons": [
{
"src": "favicon.ico",
Expand Down
2 changes: 1 addition & 1 deletion src/ipfs/addPhoto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { add } from '@fission-suite/client'
import {auth} from "./getPhotoGallery";
import { auth } from "./getPhotoGallery";

export const addPhotosToIpfs = (photos: File[]) => {
photos.map(async (photo) => {
Expand Down
6 changes: 3 additions & 3 deletions src/ipfs/getPhotoGallery.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import axios from 'axios';

export const ipfsProvider = process.env.REACT_APP_INTERPLANETARY_FISSION_URL || 'https://hostless.dev';
const username = process.env.REACT_APP_INTERPLANETARY_FISSION_USERNAME;
const password = process.env.REACT_APP_INTERPLANETARY_FISSION_PASSWORD;
export const ipfsProvider = process.env.INTERPLANETARY_FISSION_URL || 'https://runfission.com';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the REACT_APP_ here is actually intentional. Otherwise react can't find the env variables: #12 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. But in Heroku, from our add-on, it is without REACT_APP. Does it just do this automatically?

const username = process.env.INTERPLANETARY_FISSION_USERNAME;
const password = process.env.INTERPLANETARY_FISSION_PASSWORD;
export const auth = username && password && {username, password};

const getPhotoGalleryCids = async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/ipfs/getUserSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { content } from '@fission-suite/client'
export type CID = string;

export const DEFAULT_CID =
process.env.REACT_APP_DEFAULT_CID ||
process.env.DEFAULT_CID ||
"QmUWWqCNSdZmus7mc52um5cpqUi1CaE97AzBTY7iWfBXV9";

export const loadUserSettings = async (cid: CID) => {
Expand Down