├── .nvmrc ├── .gradle ├── 5.6.4 │ ├── gc.properties │ ├── fileChanges │ │ └── last-build.bin │ ├── fileHashes │ │ └── fileHashes.lock │ └── executionHistory │ │ ├── executionHistory.bin │ │ └── executionHistory.lock └── buildOutputCleanup │ ├── cache.properties │ └── buildOutputCleanup.lock ├── .eslintrc ├── .npmrc ├── android ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── splash.png │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-land-hdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-mdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-xhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-hdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-mdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── values │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── drawable-land-xxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-xxxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xxxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── xml │ │ │ │ │ ├── config.xml │ │ │ │ │ └── file_paths.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── layout │ │ │ │ │ └── activity_main.xml │ │ │ │ └── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── assets │ │ │ │ ├── capacitor.plugins.json │ │ │ │ └── capacitor.config.json │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── app │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── getcapacitor │ │ │ │ └── myapp │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── getcapacitor │ │ │ └── myapp │ │ │ └── ExampleInstrumentedTest.java │ ├── capacitor.build.gradle │ ├── proguard-rules.pro │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── capacitor.settings.gradle ├── variables.gradle ├── build.gradle ├── gradle.properties ├── .gitignore ├── gradlew.bat └── gradlew ├── screenshot.png ├── .prettierrc.json ├── public ├── favicon.ico ├── img │ ├── c1.avif │ ├── c2.avif │ ├── c3.avif │ ├── leo.jpg │ ├── max.jpg │ └── nathan.jpg └── vercel.svg ├── ios ├── App │ ├── App │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── AppIcon-512@2x.png │ │ │ │ └── Contents.json │ │ │ └── Splash.imageset │ │ │ │ ├── splash-2732x2732.png │ │ │ │ ├── splash-2732x2732-1.png │ │ │ │ ├── splash-2732x2732-2.png │ │ │ │ └── Contents.json │ │ ├── config.xml │ │ ├── capacitor.config.json │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ ├── Info.plist │ │ └── AppDelegate.swift │ ├── App.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── project.pbxproj │ ├── App.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Podfile │ └── Podfile.lock └── .gitignore ├── postcss.config.js ├── app ├── page.tsx ├── [...all] │ └── page.tsx └── layout.tsx ├── next-env.d.ts ├── tailwind.config.js ├── capacitor.config.json ├── components ├── ui │ └── Card.tsx ├── AppShell.tsx └── pages │ ├── Settings.tsx │ ├── Lists.tsx │ ├── Tabs.tsx │ ├── ListDetail.tsx │ ├── Notifications.tsx │ └── Feed.tsx ├── next.config.js ├── .gitignore ├── store ├── index.ts ├── selectors.ts └── actions.ts ├── tsconfig.json ├── LICENSE ├── package.json ├── mock └── index.ts ├── README.md └── styles ├── global.css └── variables.css /.nvmrc: -------------------------------------------------------------------------------- 1 | 20 2 | -------------------------------------------------------------------------------- /.gradle/5.6.4/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/5.6.4/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next" 3 | } 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | save-exact=true 3 | -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build/* 2 | !/build/.npmkeep 3 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Wed Jan 13 17:35:11 CST 2021 2 | gradle.version=5.6.4 3 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/screenshot.png -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "arrowParens": "avoid", 4 | "trailingComma": "all" 5 | } 6 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/img/c1.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/public/img/c1.avif -------------------------------------------------------------------------------- /public/img/c2.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/public/img/c2.avif -------------------------------------------------------------------------------- /public/img/c3.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/public/img/c3.avif -------------------------------------------------------------------------------- /public/img/leo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/public/img/leo.jpg -------------------------------------------------------------------------------- /public/img/max.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/public/img/max.jpg -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/img/nathan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/public/img/nathan.jpg -------------------------------------------------------------------------------- /.gradle/5.6.4/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/.gradle/5.6.4/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable/splash.png -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/5.6.4/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/.gradle/5.6.4/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /.gradle/5.6.4/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/.gradle/5.6.4/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /android/app/src/main/assets/capacitor.plugins.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "pkg": "@capacitor/status-bar", 4 | "classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin" 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-land-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-land-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-land-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-port-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-port-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-port-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | App/build 2 | App/Pods 3 | App/output 4 | App/App/public 5 | DerivedData 6 | xcuserdata 7 | 8 | # Cordova plugins for Capacitor 9 | capacitor-cordova-ios-plugins 10 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.app; 2 | 3 | import com.getcapacitor.BridgeActivity; 4 | 5 | public class MainActivity extends BridgeActivity {} 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-land-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-land-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-port-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/drawable-port-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlynch/nextjs-tailwind-ionic-capacitor-starter/HEAD/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png -------------------------------------------------------------------------------- /ios/App/App/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- 1 | import dynamic from 'next/dynamic'; 2 | 3 | const App = dynamic(() => import('../components/AppShell'), { 4 | ssr: false, 5 | }); 6 | 7 | export default function Page() { 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/xml/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':capacitor-cordova-android-plugins' 3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') 4 | 5 | apply from: 'capacitor.settings.gradle' -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: [ 3 | './pages/**/*.{js,ts,jsx,tsx}', 4 | './components/**/*.{js,ts,jsx,tsx}', 5 | ], 6 | darkMode: 'media', 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | }; 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /ios/App/App.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /capacitor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.example.app", 3 | "appName": "nextjs-tailwind-capacitor", 4 | "bundledWebRuntime": false, 5 | "npmClient": "npm", 6 | "webDir": "out", 7 | "plugins": { 8 | "SplashScreen": { 9 | "launchShowDuration": 0 10 | } 11 | }, 12 | "cordova": {} 13 | } 14 | -------------------------------------------------------------------------------- /ios/App/App/capacitor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.example.app", 3 | "appName": "nextjs-tailwind-capacitor", 4 | "bundledWebRuntime": false, 5 | "npmClient": "npm", 6 | "webDir": "out", 7 | "plugins": { 8 | "SplashScreen": { 9 | "launchShowDuration": 0 10 | } 11 | }, 12 | "cordova": {} 13 | } 14 | -------------------------------------------------------------------------------- /ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/assets/capacitor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.example.app", 3 | "appName": "nextjs-tailwind-capacitor", 4 | "bundledWebRuntime": false, 5 | "npmClient": "npm", 6 | "webDir": "out", 7 | "plugins": { 8 | "SplashScreen": { 9 | "launchShowDuration": 0 10 | } 11 | }, 12 | "cordova": {} 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon-512@2x.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | } 9 | ], 10 | "info" : { 11 | "author" : "xcode", 12 | "version" : 1 13 | } 14 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | nextjs-tailwind-capacitor 4 | nextjs-tailwind-capacitor 5 | com.example.app 6 | com.example.app 7 | 8 | -------------------------------------------------------------------------------- /android/capacitor.settings.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | include ':capacitor-android' 3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') 4 | 5 | include ':capacitor-status-bar' 6 | project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android') 7 | -------------------------------------------------------------------------------- /components/ui/Card.tsx: -------------------------------------------------------------------------------- 1 | import classNames from 'classnames'; 2 | 3 | const Card = ({ 4 | children, 5 | className, 6 | }: { 7 | children: React.ReactElement[]; 8 | className: string; 9 | }) => ( 10 |
11 |
12 | {children} 13 |
14 |
15 | ); 16 | 17 | export default Card; 18 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | basePath: '', 3 | images: { 4 | remotePatterns: [ 5 | { 6 | protocol: 'https', 7 | hostname: 'images.unsplash.com', 8 | port: '', 9 | pathname: '**', 10 | }, 11 | ], 12 | unoptimized: true, 13 | }, 14 | output: 'export', 15 | swcMinify: true, 16 | transpilePackages: [ 17 | '@ionic/react', 18 | '@ionic/core', 19 | '@stencil/core', 20 | 'ionicons', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /app/[...all]/page.tsx: -------------------------------------------------------------------------------- 1 | import dynamic from 'next/dynamic'; 2 | import { lists } from '../../mock'; 3 | 4 | const App = dynamic(() => import('../../components/AppShell'), { 5 | ssr: false, 6 | }); 7 | 8 | export async function generateStaticParams() { 9 | return [ 10 | { all: ['feed'] }, 11 | { all: ['lists'] }, 12 | ...lists.map(list => ({ all: ['lists', list.id] })), 13 | { all: ['settings'] }, 14 | ]; 15 | } 16 | 17 | export default function Page() { 18 | return ; 19 | } 20 | -------------------------------------------------------------------------------- /android/app/capacitor.build.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | 3 | android { 4 | compileOptions { 5 | sourceCompatibility JavaVersion.VERSION_17 6 | targetCompatibility JavaVersion.VERSION_17 7 | } 8 | } 9 | 10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" 11 | dependencies { 12 | implementation project(':capacitor-status-bar') 13 | 14 | } 15 | 16 | 17 | if (hasProperty('postBuildExtras')) { 18 | postBuildExtras() 19 | } 20 | -------------------------------------------------------------------------------- /android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | 14 | @Test 15 | public void addition_isCorrect() throws Exception { 16 | assertEquals(4, 2 + 2); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "splash-2732x2732-2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "splash-2732x2732-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "splash-2732x2732.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | tsconfig.tsbuildinfo 27 | 28 | # local env files 29 | .env.local 30 | .env.development.local 31 | .env.test.local 32 | .env.production.local 33 | 34 | # vercel 35 | .vercel 36 | -------------------------------------------------------------------------------- /android/variables.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | minSdkVersion = 22 3 | compileSdkVersion = 33 4 | targetSdkVersion = 33 5 | androidxActivityVersion = '1.7.0' 6 | androidxAppCompatVersion = '1.6.1' 7 | androidxCoordinatorLayoutVersion = '1.2.0' 8 | androidxCoreVersion = '1.10.0' 9 | androidxFragmentVersion = '1.5.6' 10 | junitVersion = '4.13.2' 11 | androidxJunitVersion = '1.1.5' 12 | androidxEspressoCoreVersion = '3.5.1' 13 | cordovaAndroidVersion = '10.1.1' 14 | coreSplashScreenVersion = '1.0.0' 15 | androidxWebkitVersion = '1.6.1' 16 | } 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:8.0.0' 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | apply from: "variables.gradle" 19 | 20 | allprojects { 21 | repositories { 22 | google() 23 | mavenCentral() 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | 31 | -------------------------------------------------------------------------------- /ios/App/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' 2 | 3 | platform :ios, '13.0' 4 | use_frameworks! 5 | 6 | # workaround to avoid Xcode caching of Pods that requires 7 | # Product -> Clean Build Folder after new Cordova plugins installed 8 | # Requires CocoaPods 1.6 or newer 9 | install! 'cocoapods', :disable_input_output_paths => true 10 | 11 | def capacitor_pods 12 | pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' 13 | pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' 14 | pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar' 15 | end 16 | 17 | target 'App' do 18 | capacitor_pods 19 | # Add your Pods here 20 | end 21 | 22 | 23 | post_install do |installer| 24 | assertDeploymentTarget(installer) 25 | end 26 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /store/index.ts: -------------------------------------------------------------------------------- 1 | import { Store as PullStateStore } from 'pullstate'; 2 | 3 | import { lists, homeItems, notifications, settings, TodoListItem, HomeItem, NotificationItem, Settings } from '../mock'; 4 | 5 | type StoreProps = { 6 | safeAreaTop: number; 7 | safeAreaBottom: number; 8 | menuOpen: boolean; 9 | notificationsOpen: boolean; 10 | currentPage: number | null; 11 | homeItems: HomeItem[]; 12 | lists: TodoListItem[]; 13 | notifications: NotificationItem[]; 14 | settings: Settings; 15 | selectedList: TodoListItem | undefined; 16 | } 17 | 18 | const Store = new PullStateStore({ 19 | safeAreaTop: 0, 20 | safeAreaBottom: 0, 21 | menuOpen: false, 22 | notificationsOpen: false, 23 | currentPage: null, 24 | homeItems, 25 | lists, 26 | notifications, 27 | settings, 28 | selectedList: undefined, 29 | }); 30 | 31 | export default Store; 32 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "_version": "2.0.0", 5 | "compilerOptions": { 6 | "lib": [ 7 | "dom", 8 | "dom.iterable", 9 | "esnext" 10 | ], 11 | "allowJs": true, 12 | "skipLibCheck": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noEmit": true, 16 | "esModuleInterop": true, 17 | "module": "esnext", 18 | "moduleResolution": "node", 19 | "resolveJsonModule": true, 20 | "isolatedModules": true, 21 | "jsx": "preserve", 22 | "incremental": true, 23 | "plugins": [ 24 | { 25 | "name": "next" 26 | } 27 | ] 28 | }, 29 | "include": [ 30 | "next-env.d.ts", 31 | "**/*.ts", 32 | "**/*.tsx", 33 | ".next/types/**/*.ts" 34 | ], 35 | "exclude": [ 36 | "node_modules" 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /components/AppShell.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react'; 3 | import { StatusBar, Style } from '@capacitor/status-bar'; 4 | import { IonReactRouter } from '@ionic/react-router'; 5 | import { Route } from 'react-router-dom'; 6 | 7 | import Tabs from './pages/Tabs'; 8 | 9 | setupIonicReact({}); 10 | 11 | window 12 | .matchMedia('(prefers-color-scheme: dark)') 13 | .addEventListener('change', async status => { 14 | try { 15 | await StatusBar.setStyle({ 16 | style: status.matches ? Style.Dark : Style.Light, 17 | }); 18 | } catch {} 19 | }); 20 | 21 | const AppShell = () => { 22 | return ( 23 | 24 | 25 | 26 | } /> 27 | 28 | 29 | 30 | ); 31 | }; 32 | 33 | export default AppShell; 34 | -------------------------------------------------------------------------------- /android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import android.content.Context; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | import androidx.test.platform.app.InstrumentationRegistry; 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * @see Testing documentation 15 | */ 16 | @RunWith(AndroidJUnit4.class) 17 | public class ExampleInstrumentedTest { 18 | 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 23 | 24 | assertEquals("com.getcapacitor.app", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ios/App/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Capacitor (5.7.2): 3 | - CapacitorCordova 4 | - CapacitorCordova (5.7.2) 5 | - CapacitorStatusBar (5.0.7): 6 | - Capacitor 7 | 8 | DEPENDENCIES: 9 | - "Capacitor (from `../../node_modules/@capacitor/ios`)" 10 | - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)" 11 | - "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)" 12 | 13 | EXTERNAL SOURCES: 14 | Capacitor: 15 | :path: "../../node_modules/@capacitor/ios" 16 | CapacitorCordova: 17 | :path: "../../node_modules/@capacitor/ios" 18 | CapacitorStatusBar: 19 | :path: "../../node_modules/@capacitor/status-bar" 20 | 21 | SPEC CHECKSUMS: 22 | Capacitor: 1450f8c66bb4e541448c11aad9460b542155b722 23 | CapacitorCordova: 70b13b8fddb6f35d8adcfe06cb5045c07f35f6de 24 | CapacitorStatusBar: 37ca5200a1791340c519239521ec2519d384eacb 25 | 26 | PODFILE CHECKSUM: fb6b0853c309f7e22b75d4c9bb586b3d3aa92a4b 27 | 28 | COCOAPODS: 1.16.2 29 | -------------------------------------------------------------------------------- /store/selectors.ts: -------------------------------------------------------------------------------- 1 | import { createSelector } from 'reselect'; 2 | import { HomeItem, NotificationItem, Settings, TodoListItem } from '../mock'; 3 | 4 | export interface RootState { 5 | homeItems: HomeItem[] 6 | lists: TodoListItem[] 7 | notifications: NotificationItem[] 8 | settings: Settings 9 | } 10 | 11 | export const createAppSelector = createSelector.withTypes() 12 | 13 | export const selectHomeItems = createAppSelector( 14 | [ 15 | state => state.homeItems 16 | ], 17 | homeItems => homeItems 18 | ) 19 | 20 | export const selectLists = createAppSelector( 21 | [ 22 | state => state.lists 23 | ], 24 | lists => lists 25 | ) 26 | 27 | export const selectNotifications = createAppSelector( 28 | [ 29 | state => state.notifications 30 | ], 31 | notifications => notifications 32 | ) 33 | 34 | export const selectSettings = createAppSelector( 35 | [ 36 | state => state.settings 37 | ], 38 | settings => settings 39 | ) 40 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | # AndroidX package structure to make it clearer which packages are bundled with the 20 | # Android operating system, and which are packaged with your app's APK 21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 22 | android.useAndroidX=true 23 | 24 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /ios/App/App/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Drifty Co 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /components/pages/Settings.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | IonPage, 3 | IonHeader, 4 | IonItem, 5 | IonToolbar, 6 | IonTitle, 7 | IonContent, 8 | IonList, 9 | IonToggle, 10 | } from '@ionic/react'; 11 | 12 | import Store from '../../store'; 13 | import * as selectors from '../../store/selectors'; 14 | import { setSettings } from '../../store/actions'; 15 | 16 | const Settings = () => { 17 | const settings = Store.useState(selectors.selectSettings); 18 | return ( 19 | 20 | 21 | 22 | Settings 23 | 24 | 25 | 26 | 27 | 28 | { 31 | setSettings({ 32 | ...settings, 33 | enableNotifications: e.target.checked, 34 | }); 35 | }} 36 | > 37 | Enable Notifications 38 | 39 | 40 | 41 | 42 | 43 | ); 44 | }; 45 | 46 | export default Settings; 47 | -------------------------------------------------------------------------------- /store/actions.ts: -------------------------------------------------------------------------------- 1 | import Store from '.'; 2 | import { ListItem, Settings, TodoListItem } from '../mock'; 3 | 4 | export const setMenuOpen = (open: boolean) => { 5 | Store.update(s => { 6 | s.menuOpen = open; 7 | }); 8 | }; 9 | 10 | export const setNotificationsOpen = (open: boolean) => { 11 | Store.update(s => { 12 | s.notificationsOpen = open; 13 | }); 14 | }; 15 | 16 | export const setSettings = (settings: Settings) => { 17 | Store.update(s => { 18 | s.settings = settings; 19 | }); 20 | }; 21 | 22 | // App-specific actions 23 | 24 | export const setDone = ( 25 | list: TodoListItem, 26 | listItem: ListItem, 27 | done: boolean, 28 | ) => { 29 | Store.update((s, o) => { 30 | const listIndex = o.lists.findIndex(l => l === list); 31 | if (listIndex === -1) return; 32 | 33 | const items = o.lists[listIndex].items; 34 | const itemIndex = items?.findIndex(i => i === listItem); 35 | if (itemIndex === undefined || itemIndex < 0) return; 36 | 37 | const draftItem = s.lists[listIndex].items?.[itemIndex]; 38 | if (!draftItem) return; 39 | 40 | draftItem.done = done; 41 | 42 | if (list === o.selectedList) { 43 | s.selectedList = s.lists[listIndex]; 44 | } 45 | }); 46 | }; 47 | -------------------------------------------------------------------------------- /components/pages/Lists.tsx: -------------------------------------------------------------------------------- 1 | import { TodoListItem } from '../../mock'; 2 | import Store from '../../store'; 3 | import * as selectors from '../../store/selectors'; 4 | import { 5 | IonPage, 6 | IonHeader, 7 | IonToolbar, 8 | IonTitle, 9 | IonContent, 10 | IonItem, 11 | IonLabel, 12 | IonList, 13 | } from '@ionic/react'; 14 | 15 | const ListEntry = ({ list }: { list: TodoListItem }) => { 16 | return ( 17 | 18 | {list.name} 19 | 20 | ); 21 | }; 22 | 23 | const AllLists = () => { 24 | const lists = Store.useState(selectors.selectLists); 25 | 26 | return ( 27 | <> 28 | {lists.map((list, i) => ( 29 | 30 | ))} 31 | 32 | ); 33 | }; 34 | 35 | const Lists = () => { 36 | return ( 37 | 38 | 39 | 40 | Lists 41 | 42 | 43 | 44 | 45 | 46 | Lists 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | ); 55 | }; 56 | 57 | export default Lists; 58 | -------------------------------------------------------------------------------- /components/pages/Tabs.tsx: -------------------------------------------------------------------------------- 1 | import { Redirect, Route, Switch } from 'react-router-dom'; 2 | import { 3 | IonRouterOutlet, 4 | IonTabs, 5 | IonTabBar, 6 | IonTabButton, 7 | IonIcon, 8 | IonLabel, 9 | } from '@ionic/react'; 10 | import { cog, flash, list } from 'ionicons/icons'; 11 | 12 | import Home from './Feed'; 13 | import Lists from './Lists'; 14 | import ListDetail from './ListDetail'; 15 | import Settings from './Settings'; 16 | 17 | const Tabs = () => { 18 | return ( 19 | 20 | 21 | 22 | } exact={true} /> 23 | } exact={true} /> 24 | } 27 | exact={true} 28 | /> 29 | } exact={true} /> 30 | } exact={true} /> 31 | 32 | 33 | 34 | 35 | 36 | Feed 37 | 38 | 39 | 40 | Lists 41 | 42 | 43 | 44 | Settings 45 | 46 | 47 | 48 | ); 49 | }; 50 | 51 | export default Tabs; 52 | -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata, Viewport } from 'next'; 2 | import Script from 'next/script'; 3 | 4 | import 'tailwindcss/tailwind.css'; 5 | /* Core CSS required for Ionic components to work properly */ 6 | import '@ionic/react/css/core.css'; 7 | 8 | /* Basic CSS for apps built with Ionic */ 9 | import '@ionic/react/css/normalize.css'; 10 | import '@ionic/react/css/structure.css'; 11 | import '@ionic/react/css/typography.css'; 12 | 13 | /* Optional CSS utils that can be commented out */ 14 | import '@ionic/react/css/padding.css'; 15 | import '@ionic/react/css/float-elements.css'; 16 | import '@ionic/react/css/text-alignment.css'; 17 | import '@ionic/react/css/text-transformation.css'; 18 | import '@ionic/react/css/flex-utils.css'; 19 | import '@ionic/react/css/display.css'; 20 | 21 | import '../styles/global.css'; 22 | import '../styles/variables.css'; 23 | 24 | export const metadata: Metadata = { 25 | title: 'Create Next App', 26 | description: 'Generated by create next app', 27 | }; 28 | 29 | export const viewport: Viewport = { 30 | initialScale: 1, 31 | width: 'device-width', 32 | viewportFit: 'cover', 33 | }; 34 | 35 | export default function RootLayout({ 36 | children, 37 | }: Readonly<{ 38 | children: React.ReactNode; 39 | }>) { 40 | return ( 41 | 42 | {children} 43 |