feat: fixes and formatter
This commit is contained in:
+19
-19
@@ -1,37 +1,37 @@
|
||||
import "@expo/metro-runtime";
|
||||
import { registerRootComponent } from "expo";
|
||||
import '@expo/metro-runtime'
|
||||
import { registerRootComponent } from 'expo'
|
||||
|
||||
import App from "./App";
|
||||
import App from './App'
|
||||
|
||||
// Inject minimal global CSS and a small setNativeProps polyfill for web
|
||||
if (typeof document !== "undefined") {
|
||||
document.documentElement?.setAttribute("translate", "no");
|
||||
document.body?.setAttribute("translate", "no");
|
||||
if (typeof document !== 'undefined') {
|
||||
document.documentElement?.setAttribute('translate', 'no')
|
||||
document.body?.setAttribute('translate', 'no')
|
||||
|
||||
const style = document.createElement("style");
|
||||
style.setAttribute("data-inline-global", "true");
|
||||
const style = document.createElement('style')
|
||||
style.setAttribute('data-inline-global', 'true')
|
||||
style.innerHTML = `
|
||||
html, body, #root { height: 100%; }
|
||||
body { margin: 0; }
|
||||
*:focus { outline: none; }
|
||||
* { scrollbar-width: none; -ms-overflow-style: none; }
|
||||
*::-webkit-scrollbar { display: none; }
|
||||
`;
|
||||
document.head.appendChild(style);
|
||||
`
|
||||
document.head.appendChild(style)
|
||||
|
||||
const proto = window.HTMLElement && window.HTMLElement.prototype;
|
||||
if (proto && typeof proto.setNativeProps !== "function") {
|
||||
const proto = window.HTMLElement && window.HTMLElement.prototype
|
||||
if (proto && typeof proto.setNativeProps !== 'function') {
|
||||
proto.setNativeProps = function (nativeProps = {}) {
|
||||
try {
|
||||
const { style: s, pointerEvents, ...rest } = nativeProps || {};
|
||||
const { style: s, pointerEvents, ...rest } = nativeProps || {}
|
||||
if (pointerEvents != null) {
|
||||
this.style.pointerEvents = pointerEvents;
|
||||
this.style.pointerEvents = pointerEvents
|
||||
}
|
||||
if (s && typeof s === "object") {
|
||||
if (s && typeof s === 'object') {
|
||||
for (const k in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, k)) {
|
||||
try {
|
||||
this.style[k] = s[k];
|
||||
this.style[k] = s[k]
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
@@ -39,13 +39,13 @@ if (typeof document !== "undefined") {
|
||||
for (const k in rest) {
|
||||
if (Object.prototype.hasOwnProperty.call(rest, k)) {
|
||||
try {
|
||||
this.style[k] = rest[k];
|
||||
this.style[k] = rest[k]
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
registerRootComponent(App);
|
||||
registerRootComponent(App)
|
||||
|
||||
Reference in New Issue
Block a user