Skip to content

Commit

Permalink
chore: prettified files
Browse files Browse the repository at this point in the history
  • Loading branch information
Efstathios Ntonas committed May 11, 2023
1 parent 52cd27e commit 3288507
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {AppRegistry} from 'react-native';
import { AppRegistry } from 'react-native';
import Routes from './routes';
import {name as appName} from './app.json';
import { name as appName } from './app.json';

AppRegistry.registerComponent(appName, () => Routes);
2 changes: 1 addition & 1 deletion example/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const escape = require('escape-string-regexp');

const root = path.resolve(__dirname, '..');
const pak = JSON.parse(
fs.readFileSync(path.join(root, 'package.json'), 'utf8'),
fs.readFileSync(path.join(root, 'package.json'), 'utf8'),
);

const modules = [
Expand Down
28 changes: 14 additions & 14 deletions example/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ import PrefetchImage from './src/PrefetchImage';
const Stack = createNativeStackNavigator();

function Routes() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<NavigationContainer>
<Stack.Navigator initialRouteName="App">
<Stack.Screen
name="App"
component={App}
options={{ headerShown: false }}
/>
<Stack.Screen name="PrefetchImage" component={PrefetchImage} />
</Stack.Navigator>
</NavigationContainer>
</GestureHandlerRootView>
);
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<NavigationContainer>
<Stack.Navigator initialRouteName="App">
<Stack.Screen
name="App"
component={App}
options={{ headerShown: false }}
/>
<Stack.Screen name="PrefetchImage" component={PrefetchImage} />
</Stack.Navigator>
</NavigationContainer>
</GestureHandlerRootView>
);
}

export default Routes;
6 changes: 5 additions & 1 deletion src/CacheManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ export default class CacheManager {
noCache?: boolean,
maxAge?: number
): CacheEntry {
if (!CacheManager.entries[source] || CacheManager.entries[source].options?.headers?.Authorization !== options?.headers?.Authorization) {
if (
!CacheManager.entries[source] ||
CacheManager.entries[source].options?.headers?.Authorization !==
options?.headers?.Authorization
) {
CacheManager.entries[source] = new CacheEntry(
source,
options,
Expand Down

0 comments on commit 3288507

Please sign in to comment.