TODO REVERT THESE CHANGES

This commit is contained in:
Hailey
2024-04-23 10:45:13 -07:00
parent 9c95365090
commit 279f717f30
3 changed files with 15 additions and 4 deletions
+6 -1
View File
@@ -481,7 +481,12 @@ const FlatNavigator = () => {
const LINKING = { const LINKING = {
// TODO figure out what we are going to use // TODO figure out what we are going to use
prefixes: ['bsky://', 'bluesky://', 'https://bsky.app'], prefixes: [
'bsky://',
'bluesky://',
'https://bsky.app',
'http://localhost:19006',
],
getPathFromState(state: State) { getPathFromState(state: State) {
// find the current node in the navigation tree // find the current node in the navigation tree
+1 -1
View File
@@ -127,7 +127,7 @@ export function useLink({
if ( if (
shouldOpenInNewTab || shouldOpenInNewTab ||
href.startsWith('http') || // href.startsWith('http') || // TODO REVERT ME
href.startsWith('mailto') href.startsWith('mailto')
) { ) {
openLink(href) openLink(href)
+8 -2
View File
@@ -1,7 +1,8 @@
import {AtUri} from '@atproto/api' import {AtUri} from '@atproto/api'
import {BSKY_SERVICE} from 'lib/constants'
import TLDs from 'tlds'
import psl from 'psl' import psl from 'psl'
import TLDs from 'tlds'
import {BSKY_SERVICE} from 'lib/constants'
export const BSKY_APP_HOST = 'https://bsky.app' export const BSKY_APP_HOST = 'https://bsky.app'
const BSKY_TRUSTED_HOSTS = [ const BSKY_TRUSTED_HOSTS = [
@@ -98,6 +99,11 @@ export function isBskyRSSUrl(url: string): boolean {
} }
export function isExternalUrl(url: string): boolean { export function isExternalUrl(url: string): boolean {
if (__DEV__ && url.startsWith('http://localhost:19006')) {
console.warn('REVERT ME')
return false
}
const external = !isBskyAppUrl(url) && url.startsWith('http') const external = !isBskyAppUrl(url) && url.startsWith('http')
const rss = isBskyRSSUrl(url) const rss = isBskyRSSUrl(url)
return external || rss return external || rss