Skip to content

Commit

Permalink
first
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi3110200 committed Jun 23, 2024
1 parent 5a1de96 commit d348688
Show file tree
Hide file tree
Showing 34 changed files with 748 additions and 504 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ yarn-error.*

# typescript
*.tsbuildinfo

# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
26 changes: 26 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import axios from "axios";

const API_KEY = '44542612-f003b071cda57c2bc0b251748';
const apiUrl = `https://pixabay.com/api/?key=${API_KEY}`
const formateUrl=(params)=>{
let url = apiUrl + '&per_page=25&safesearch=true&editors_choice=true';
if(!params) return url;
let paramKeys= Object.keys(params);
paramKeys.map(key=>{
let value = key=='q' ? encodeURIComponent(params[key]): params[key];
url += `&${key}=${value}`
})
// console.log('final url', url);
return url;
}

export const apiCall = async (params)=>{
try{
const response = await axios.get(formateUrl(params));
const {data}= response;
return {success:true, data};
}catch(err){
console.log(err.message);
return {success : false, msg:err.message};
}
}
6 changes: 4 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"bundleIdentifier": "com.ABHIJEET.wallpaper-app"

},
"web": {
"bundler": "metro",
Expand Down
59 changes: 0 additions & 59 deletions app/(tabs)/_layout.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions app/(tabs)/index.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions app/(tabs)/two.tsx

This file was deleted.

38 changes: 0 additions & 38 deletions app/+html.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions app/+not-found.tsx

This file was deleted.

18 changes: 18 additions & 0 deletions app/_layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Stack } from 'expo-router'
import React from 'react'
import {View, Text} from 'react-native';

const Layout = () => {
return (
<Stack>
<Stack.Screen name='index' options={{
headerShown:false
}}/>
<Stack.Screen name='home/index' options={{
headerShown:false
}}/>
</Stack>
)
}

export default Layout
59 changes: 0 additions & 59 deletions app/_layout.tsx

This file was deleted.

Loading

0 comments on commit d348688

Please sign in to comment.