-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
IPFS hash of the deployment: | ||
CIDv1: bafybeidsucvs434zirxhib6npfzfqg4jagv6xkccfxjz3gmegib2bu36zq | ||
|
||
The latest release is always mirrored at [crustfiles.io](https://crustfiles.io). | ||
|
||
|
||
Your Uniswap settings are never remembered across different URLs. | ||
|
||
IPFS gateways: | ||
|
||
- https://bafybeidsucvs434zirxhib6npfzfqg4jagv6xkccfxjz3gmegib2bu36zq.ipfs.dweb.link/ | ||
- https://bafybeidsucvs434zirxhib6npfzfqg4jagv6xkccfxjz3gmegib2bu36zq.ipfs.cf-ipfs.com/ | ||
- [ipfs://QmW47HPC4SPLcqU9J19iTWNzjsqyaTmbUyhxUyNLcPNqhu/](ipfs://QmW47HPC4SPLcqU9J19iTWNzjsqyaTmbUyhxUyNLcPNqhu/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
import { useEffect } from 'react' | ||
import { useEffect } from "react"; | ||
|
||
export const DomainRef = { | ||
value: 'crustfiles.io', | ||
} | ||
value: "crustfiles.io", | ||
}; | ||
|
||
const supportDomain = ["crustfiles.io", "crustfiles.com", "crustfiles.xyz"]; | ||
|
||
export const getAvilableDomain = () => { | ||
if (location.hostname == "localhost") return supportDomain[0]; | ||
if (location.hostname.match(/^\d+\.\d+\.\d+\.\d+$/)?.length == 1) return supportDomain[0]; | ||
const domains = location.hostname.split("."); | ||
let domain = domains.slice(-2).join("."); | ||
if (domains[1] == "ipns") { | ||
domain = domains[0].replaceAll("-", "."); | ||
} | ||
if (supportDomain.includes(domain)) { | ||
return location.hostname; | ||
} | ||
return supportDomain[0]; | ||
}; | ||
export function useConfigDomain() { | ||
useEffect(() => { | ||
if (location.hostname !== 'localhost' && location.hostname !== DomainRef.value) { | ||
DomainRef.value = location.hostname | ||
} | ||
}, []) | ||
DomainRef.value = getAvilableDomain(); | ||
}, []); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters