-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bc831c
commit a4fe68c
Showing
27 changed files
with
18,127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"appId": "io.ionic.starter", | ||
"appName": "ionic-whatsapp", | ||
"bundledWebRuntime": false, | ||
"npmClient": "npm", | ||
"webDir": "build", | ||
"plugins": { | ||
"SplashScreen": { | ||
"launchShowDuration": 0 | ||
} | ||
}, | ||
"cordova": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "ionic-whatsapp", | ||
"integrations": { | ||
"capacitor": {} | ||
}, | ||
"type": "react" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"name": "ionic-whatsapp", | ||
"version": "0.0.1", | ||
"private": true, | ||
"dependencies": { | ||
"@capacitor/core": "2.4.7", | ||
"@ionic/react": "^5.5.0", | ||
"@ionic/react-router": "^5.5.0", | ||
"@testing-library/jest-dom": "^5.11.9", | ||
"@testing-library/react": "^11.2.5", | ||
"@testing-library/user-event": "^12.6.3", | ||
"@types/jest": "^26.0.20", | ||
"@types/node": "^12.19.15", | ||
"@types/react": "^16.14.3", | ||
"@types/react-dom": "^16.9.10", | ||
"@types/react-router": "^5.1.11", | ||
"@types/react-router-dom": "^5.1.7", | ||
"ionicons": "^5.4.0", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"react-router": "^5.2.0", | ||
"react-router-dom": "^5.2.0", | ||
"react-scripts": "4.0.2", | ||
"typescript": "^4.1.3", | ||
"web-vitals": "^0.2.4", | ||
"workbox-background-sync": "^5.1.4", | ||
"workbox-broadcast-update": "^5.1.4", | ||
"workbox-cacheable-response": "^5.1.4", | ||
"workbox-core": "^5.1.4", | ||
"workbox-expiration": "^5.1.4", | ||
"workbox-google-analytics": "^5.1.4", | ||
"workbox-navigation-preload": "^5.1.4", | ||
"workbox-precaching": "^5.1.4", | ||
"workbox-range-requests": "^5.1.4", | ||
"workbox-routing": "^5.1.4", | ||
"workbox-strategies": "^5.1.4", | ||
"workbox-streams": "^5.1.4" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app", | ||
"react-app/jest" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@capacitor/cli": "2.4.7" | ||
}, | ||
"description": "An Ionic project" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Ionic App</title> | ||
|
||
<base href="/" /> | ||
|
||
<meta name="color-scheme" content="light dark" /> | ||
<meta | ||
name="viewport" | ||
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" | ||
/> | ||
<meta name="format-detection" content="telephone=no" /> | ||
<meta name="msapplication-tap-highlight" content="no" /> | ||
|
||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
|
||
<link rel="shortcut icon" type="image/png" href="%PUBLIC_URL%/assets/icon/favicon.png" /> | ||
|
||
<!-- add to homescreen for ios --> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-title" content="Ionic App" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"short_name": "Ionic App", | ||
"name": "My Ionic App", | ||
"icons": [ | ||
{ | ||
"src": "assets/icon/favicon.png", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
}, | ||
{ | ||
"src": "assets/icon/icon.png", | ||
"type": "image/png", | ||
"sizes": "512x512", | ||
"purpose": "maskable" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#ffffff", | ||
"background_color": "#ffffff" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import App from './App'; | ||
|
||
test('renders without crashing', () => { | ||
const { baseElement } = render(<App />); | ||
expect(baseElement).toBeDefined(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { Redirect, Route } from 'react-router-dom'; | ||
import { | ||
IonApp, | ||
IonIcon, | ||
IonLabel, | ||
IonRouterOutlet, | ||
IonTabBar, | ||
IonTabButton, | ||
IonTabs, | ||
} from '@ionic/react'; | ||
import { IonReactRouter } from '@ionic/react-router'; | ||
import { ellipse, square, triangle } from 'ionicons/icons'; | ||
import Tab1 from './pages/Tab1'; | ||
import Tab2 from './pages/Tab2'; | ||
import Tab3 from './pages/Tab3'; | ||
|
||
/* Core CSS required for Ionic components to work properly */ | ||
import '@ionic/react/css/core.css'; | ||
|
||
/* Basic CSS for apps built with Ionic */ | ||
import '@ionic/react/css/normalize.css'; | ||
import '@ionic/react/css/structure.css'; | ||
import '@ionic/react/css/typography.css'; | ||
|
||
/* Optional CSS utils that can be commented out */ | ||
import '@ionic/react/css/padding.css'; | ||
import '@ionic/react/css/float-elements.css'; | ||
import '@ionic/react/css/text-alignment.css'; | ||
import '@ionic/react/css/text-transformation.css'; | ||
import '@ionic/react/css/flex-utils.css'; | ||
import '@ionic/react/css/display.css'; | ||
|
||
/* Theme variables */ | ||
import './theme/variables.css'; | ||
|
||
const App: React.FC = () => ( | ||
<IonApp> | ||
<IonReactRouter> | ||
<IonTabs> | ||
<IonRouterOutlet> | ||
<Route exact path="/tab1"> | ||
<Tab1 /> | ||
</Route> | ||
<Route exact path="/tab2"> | ||
<Tab2 /> | ||
</Route> | ||
<Route path="/tab3"> | ||
<Tab3 /> | ||
</Route> | ||
<Route exact path="/"> | ||
<Redirect to="/tab1" /> | ||
</Route> | ||
</IonRouterOutlet> | ||
<IonTabBar slot="bottom"> | ||
<IonTabButton tab="tab1" href="/tab1"> | ||
<IonIcon icon={triangle} /> | ||
<IonLabel>Tab 1</IonLabel> | ||
</IonTabButton> | ||
<IonTabButton tab="tab2" href="/tab2"> | ||
<IonIcon icon={ellipse} /> | ||
<IonLabel>Tab 2</IonLabel> | ||
</IonTabButton> | ||
<IonTabButton tab="tab3" href="/tab3"> | ||
<IonIcon icon={square} /> | ||
<IonLabel>Tab 3</IonLabel> | ||
</IonTabButton> | ||
</IonTabBar> | ||
</IonTabs> | ||
</IonReactRouter> | ||
</IonApp> | ||
); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.container { | ||
text-align: center; | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
} | ||
|
||
.container strong { | ||
font-size: 20px; | ||
line-height: 26px; | ||
} | ||
|
||
.container p { | ||
font-size: 16px; | ||
line-height: 22px; | ||
color: #8c8c8c; | ||
margin: 0; | ||
} | ||
|
||
.container a { | ||
text-decoration: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import './ExploreContainer.css'; | ||
|
||
interface ContainerProps { | ||
name: string; | ||
} | ||
|
||
const ExploreContainer: React.FC<ContainerProps> = ({ name }) => { | ||
return ( | ||
<div className="container"> | ||
<strong>{name}</strong> | ||
<p>Explore <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ExploreContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
import * as serviceWorkerRegistration from './serviceWorkerRegistration'; | ||
import reportWebVitals from './reportWebVitals'; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
); | ||
|
||
// If you want your app to work offline and load faster, you can change | ||
// unregister() to register() below. Note this comes with some pitfalls. | ||
// Learn more about service workers: https://cra.link/PWA | ||
serviceWorkerRegistration.unregister(); | ||
|
||
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | ||
reportWebVitals(); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; | ||
import ExploreContainer from '../components/ExploreContainer'; | ||
import './Tab1.css'; | ||
|
||
const Tab1: React.FC = () => { | ||
return ( | ||
<IonPage> | ||
<IonHeader> | ||
<IonToolbar> | ||
<IonTitle>Tab 1</IonTitle> | ||
</IonToolbar> | ||
</IonHeader> | ||
<IonContent fullscreen> | ||
<IonHeader collapse="condense"> | ||
<IonToolbar> | ||
<IonTitle size="large">Tab 1</IonTitle> | ||
</IonToolbar> | ||
</IonHeader> | ||
<ExploreContainer name="Tab 1 page" /> | ||
</IonContent> | ||
</IonPage> | ||
); | ||
}; | ||
|
||
export default Tab1; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; | ||
import ExploreContainer from '../components/ExploreContainer'; | ||
import './Tab2.css'; | ||
|
||
const Tab2: React.FC = () => { | ||
return ( | ||
<IonPage> | ||
<IonHeader> | ||
<IonToolbar> | ||
<IonTitle>Tab 2</IonTitle> | ||
</IonToolbar> | ||
</IonHeader> | ||
<IonContent fullscreen> | ||
<IonHeader collapse="condense"> | ||
<IonToolbar> | ||
<IonTitle size="large">Tab 2</IonTitle> | ||
</IonToolbar> | ||
</IonHeader> | ||
<ExploreContainer name="Tab 2 page" /> | ||
</IonContent> | ||
</IonPage> | ||
); | ||
}; | ||
|
||
export default Tab2; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; | ||
import ExploreContainer from '../components/ExploreContainer'; | ||
import './Tab3.css'; | ||
|
||
const Tab3: React.FC = () => { | ||
return ( | ||
<IonPage> | ||
<IonHeader> | ||
<IonToolbar> | ||
<IonTitle>Tab 3</IonTitle> | ||
</IonToolbar> | ||
</IonHeader> | ||
<IonContent fullscreen> | ||
<IonHeader collapse="condense"> | ||
<IonToolbar> | ||
<IonTitle size="large">Tab 3</IonTitle> | ||
</IonToolbar> | ||
</IonHeader> | ||
<ExploreContainer name="Tab 3 page" /> | ||
</IonContent> | ||
</IonPage> | ||
); | ||
}; | ||
|
||
export default Tab3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="react-scripts" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ReportHandler } from 'web-vitals'; | ||
|
||
const reportWebVitals = (onPerfEntry?: ReportHandler) => { | ||
if (onPerfEntry && onPerfEntry instanceof Function) { | ||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { | ||
getCLS(onPerfEntry); | ||
getFID(onPerfEntry); | ||
getFCP(onPerfEntry); | ||
getLCP(onPerfEntry); | ||
getTTFB(onPerfEntry); | ||
}); | ||
} | ||
}; | ||
|
||
export default reportWebVitals; |
Oops, something went wrong.