mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
fix safari 14 issues
This commit is contained in:
@@ -10,7 +10,7 @@ const parseEnvJson = <DataType>(env: string | undefined): DataType | null => {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
const stripTrailingSlash = (str: string) => str.at(-1) === '/' ? str.slice(0, -1) : str;
|
||||
const stripTrailingSlash = (str: string) => str[str.length - 1] === '/' ? str.slice(0, -1) : str;
|
||||
|
||||
const env = process.env.VERCEL_ENV || process.env.NODE_ENV;
|
||||
const isDev = env === 'development';
|
||||
|
||||
@@ -123,6 +123,10 @@ function makePolicyMap() {
|
||||
'fonts.googleapis.com',
|
||||
],
|
||||
|
||||
'prefetch-src': [
|
||||
...MAIN_DOMAINS,
|
||||
],
|
||||
|
||||
'object-src': [
|
||||
KEY_WORDS.NONE,
|
||||
],
|
||||
|
||||
@@ -16,7 +16,7 @@ import appConfig from 'configs/app/config';
|
||||
// },
|
||||
// ]).replaceAll('"', '\'');
|
||||
|
||||
const stripTrailingSlash = (str: string) => str.at(-1) === '/' ? str.slice(0, -1) : str;
|
||||
const stripTrailingSlash = (str: string) => str[str.length - 1] === '/' ? str.slice(0, -1) : str;
|
||||
const addLeadingSlash = (str: string) => str.at(0) === '/' ? str : '/' + str;
|
||||
|
||||
const networkExplorers: Array<NetworkExplorer> = (() => {
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function useAdaptiveTabs(tabs: Array<RoutedTab>, disabled?: boole
|
||||
const calculateCut = React.useCallback(() => {
|
||||
const listWidth = listRef.current?.getBoundingClientRect().width;
|
||||
const tabWidths = tabsRefs.map((tab) => tab.current?.getBoundingClientRect().width);
|
||||
const menuWidth = tabWidths.at(-1);
|
||||
const menuWidth = tabWidths[tabWidths.length - 1];
|
||||
|
||||
if (!listWidth || !menuWidth) {
|
||||
return tabs.length;
|
||||
|
||||
Reference in New Issue
Block a user