create-croissant 0.1.46 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/apps/platform/src/routes/api/auth/$.ts +1 -1
- package/template/apps/platform/src/routes/api/rpc.$.ts +2 -2
- package/template/package.json +2 -7
- package/template/tsconfig.json +1 -2
- package/template/.github/dependabot.yml +0 -15
- package/template/.github/workflows/ci.yml +0 -143
- package/template/.github/workflows/dependabot-automerge.yml +0 -23
- package/template/.husky/pre-push +0 -11
- package/template/apps/mobile/.vscode/extensions.json +0 -1
- package/template/apps/mobile/.vscode/settings.json +0 -7
- package/template/apps/mobile/README.md +0 -50
- package/template/apps/mobile/app/(tabs)/_layout.tsx +0 -43
- package/template/apps/mobile/app/(tabs)/account.tsx +0 -147
- package/template/apps/mobile/app/(tabs)/explore.tsx +0 -345
- package/template/apps/mobile/app/(tabs)/index.tsx +0 -112
- package/template/apps/mobile/app/_layout.tsx +0 -43
- package/template/apps/mobile/app/index.tsx +0 -129
- package/template/apps/mobile/app/login.tsx +0 -135
- package/template/apps/mobile/app/signup.tsx +0 -144
- package/template/apps/mobile/app.json +0 -56
- package/template/apps/mobile/assets/images/android-icon-background.png +0 -0
- package/template/apps/mobile/assets/images/android-icon-foreground.png +0 -0
- package/template/apps/mobile/assets/images/android-icon-monochrome.png +0 -0
- package/template/apps/mobile/assets/images/favicon.png +0 -0
- package/template/apps/mobile/assets/images/icon.png +0 -0
- package/template/apps/mobile/assets/images/partial-react-logo.png +0 -0
- package/template/apps/mobile/assets/images/react-logo.png +0 -0
- package/template/apps/mobile/assets/images/react-logo@2x.png +0 -0
- package/template/apps/mobile/assets/images/react-logo@3x.png +0 -0
- package/template/apps/mobile/assets/images/splash-icon.png +0 -0
- package/template/apps/mobile/components/external-link.tsx +0 -25
- package/template/apps/mobile/components/haptic-tab.tsx +0 -18
- package/template/apps/mobile/components/hello-wave.tsx +0 -20
- package/template/apps/mobile/components/parallax-scroll-view.tsx +0 -81
- package/template/apps/mobile/components/themed-text.tsx +0 -60
- package/template/apps/mobile/components/themed-view.tsx +0 -14
- package/template/apps/mobile/components/ui/button.tsx +0 -86
- package/template/apps/mobile/components/ui/collapsible.tsx +0 -46
- package/template/apps/mobile/components/ui/icon-symbol.ios.tsx +0 -32
- package/template/apps/mobile/components/ui/icon-symbol.tsx +0 -41
- package/template/apps/mobile/components/ui/input.tsx +0 -56
- package/template/apps/mobile/constants/theme.ts +0 -53
- package/template/apps/mobile/hooks/use-color-scheme.ts +0 -1
- package/template/apps/mobile/hooks/use-color-scheme.web.ts +0 -21
- package/template/apps/mobile/hooks/use-theme-color.ts +0 -21
- package/template/apps/mobile/lib/auth-client.ts +0 -14
- package/template/apps/mobile/lib/orpc.ts +0 -28
- package/template/apps/mobile/package.json +0 -57
- package/template/apps/mobile/scripts/reset-project.js +0 -112
- package/template/apps/mobile/tsconfig.json +0 -13
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { auth } from "@workspace/auth/lib/auth";
|
|
|
2
2
|
import { createFileRoute } from "@tanstack/react-router";
|
|
3
3
|
|
|
4
4
|
const CORS_HEADERS = {
|
|
5
|
-
"Access-Control-Allow-Origin": "
|
|
5
|
+
"Access-Control-Allow-Origin": "*",
|
|
6
6
|
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
|
7
7
|
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
|
8
8
|
"Access-Control-Allow-Credentials": "true",
|
|
@@ -28,7 +28,7 @@ export const Route = createFileRoute("/api/rpc/$")({
|
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
if (response) {
|
|
31
|
-
response.headers.set("Access-Control-Allow-Origin", "
|
|
31
|
+
response.headers.set("Access-Control-Allow-Origin", "*");
|
|
32
32
|
response.headers.set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
|
|
33
33
|
response.headers.set("Access-Control-Allow-Headers", "Content-Type, Authorization");
|
|
34
34
|
response.headers.set("Access-Control-Allow-Credentials", "true");
|
|
@@ -40,7 +40,7 @@ export const Route = createFileRoute("/api/rpc/$")({
|
|
|
40
40
|
return new Response(null, {
|
|
41
41
|
status: 204,
|
|
42
42
|
headers: {
|
|
43
|
-
"Access-Control-Allow-Origin": "
|
|
43
|
+
"Access-Control-Allow-Origin": "*",
|
|
44
44
|
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
|
45
45
|
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
|
46
46
|
"Access-Control-Allow-Credentials": "true",
|
package/template/package.json
CHANGED
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"quality": "turbo quality",
|
|
14
14
|
"quality:fix": "turbo quality:fix",
|
|
15
15
|
"typecheck": "turbo typecheck",
|
|
16
|
-
"dev:mobile": "turbo run dev --filter=mobile",
|
|
17
|
-
"dev:ios": "turbo run dev --filter=mobile -- --ios",
|
|
18
|
-
"dev:android": "turbo run dev --filter=mobile -- --android",
|
|
19
16
|
"ci": "pnpm run lint && pnpm run typecheck && pnpm run build",
|
|
20
17
|
"db:up": "docker compose up -d",
|
|
21
18
|
"db:down": "docker compose down",
|
|
@@ -25,8 +22,7 @@
|
|
|
25
22
|
},
|
|
26
23
|
"dependencies": {
|
|
27
24
|
"react": "19.2.5",
|
|
28
|
-
"react-dom": "19.2.5"
|
|
29
|
-
"react-native": "0.83.6"
|
|
25
|
+
"react-dom": "19.2.5"
|
|
30
26
|
},
|
|
31
27
|
"devDependencies": {
|
|
32
28
|
"@better-auth/core": "^1.6.9",
|
|
@@ -46,8 +42,7 @@
|
|
|
46
42
|
"@noble/ciphers": "2.2.0",
|
|
47
43
|
"drizzle-orm": "^0.45.2",
|
|
48
44
|
"react": "19.2.5",
|
|
49
|
-
"react-dom": "19.2.5"
|
|
50
|
-
"react-native": "0.83.6"
|
|
45
|
+
"react-dom": "19.2.5"
|
|
51
46
|
}
|
|
52
47
|
},
|
|
53
48
|
"engines": {
|
package/template/tsconfig.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "pnpm"
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: "weekly"
|
|
7
|
-
open-pull-requests-limit: 10
|
|
8
|
-
groups:
|
|
9
|
-
dependencies:
|
|
10
|
-
patterns:
|
|
11
|
-
- "*"
|
|
12
|
-
- package-ecosystem: "github-actions"
|
|
13
|
-
directory: "/"
|
|
14
|
-
schedule:
|
|
15
|
-
interval: "monthly"
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: ["main"]
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: write
|
|
11
|
-
id-token: write
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
build:
|
|
15
|
-
name: Build and Test
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- name: Checkout Repo
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
with:
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
|
|
23
|
-
- name: Setup Node.js
|
|
24
|
-
uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version: 24
|
|
27
|
-
|
|
28
|
-
- name: Setup pnpm
|
|
29
|
-
uses: pnpm/action-setup@v4
|
|
30
|
-
with:
|
|
31
|
-
version: 9.15.0
|
|
32
|
-
run_install: false
|
|
33
|
-
|
|
34
|
-
- name: Get pnpm store directory
|
|
35
|
-
shell: bash
|
|
36
|
-
run: |
|
|
37
|
-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
38
|
-
|
|
39
|
-
- name: Setup pnpm cache
|
|
40
|
-
uses: actions/cache@v4
|
|
41
|
-
with:
|
|
42
|
-
path: ${{ env.STORE_PATH }}
|
|
43
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
44
|
-
restore-keys: |
|
|
45
|
-
${{ runner.os }}-pnpm-store-
|
|
46
|
-
|
|
47
|
-
- name: Install Dependencies
|
|
48
|
-
run: pnpm install
|
|
49
|
-
|
|
50
|
-
- name: Lint
|
|
51
|
-
run: pnpm run lint
|
|
52
|
-
|
|
53
|
-
- name: Typecheck
|
|
54
|
-
run: pnpm run typecheck
|
|
55
|
-
|
|
56
|
-
- name: Build
|
|
57
|
-
run: pnpm run build
|
|
58
|
-
|
|
59
|
-
release:
|
|
60
|
-
name: Release create-croissant
|
|
61
|
-
needs: build
|
|
62
|
-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
63
|
-
runs-on: ubuntu-latest
|
|
64
|
-
steps:
|
|
65
|
-
- name: Checkout Repo
|
|
66
|
-
uses: actions/checkout@v4
|
|
67
|
-
with:
|
|
68
|
-
fetch-depth: 0
|
|
69
|
-
|
|
70
|
-
- name: Setup Node.js
|
|
71
|
-
uses: actions/setup-node@v4
|
|
72
|
-
with:
|
|
73
|
-
node-version: 24
|
|
74
|
-
registry-url: "https://registry.npmjs.org"
|
|
75
|
-
|
|
76
|
-
- name: Setup pnpm
|
|
77
|
-
uses: pnpm/action-setup@v4
|
|
78
|
-
with:
|
|
79
|
-
version: 9.15.0
|
|
80
|
-
run_install: false
|
|
81
|
-
|
|
82
|
-
- name: Install Dependencies
|
|
83
|
-
run: pnpm install
|
|
84
|
-
|
|
85
|
-
- name: Bump Version and Publish
|
|
86
|
-
run: |
|
|
87
|
-
# Configure git
|
|
88
|
-
git config --global user.name "github-actions[bot]"
|
|
89
|
-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
90
|
-
|
|
91
|
-
# Prepare the template from the latest monorepo state
|
|
92
|
-
pnpm --filter create-croissant run prepare-template
|
|
93
|
-
|
|
94
|
-
# Move into the package directory for versioning and publishing
|
|
95
|
-
cd packages/create-croissant
|
|
96
|
-
|
|
97
|
-
# Get the latest version from npm to avoid conflicts
|
|
98
|
-
NPM_VERSION=$(pnpm view create-croissant version 2>/dev/null || echo "0.0.0")
|
|
99
|
-
LOCAL_VERSION=$(node -p "require('./package.json').version")
|
|
100
|
-
|
|
101
|
-
echo "NPM version: $NPM_VERSION"
|
|
102
|
-
echo "Local version: $LOCAL_VERSION"
|
|
103
|
-
|
|
104
|
-
# If npm has a higher version, sync local version first
|
|
105
|
-
if [ "$NPM_VERSION" != "$LOCAL_VERSION" ] && [ "$(printf '%s\n' "$NPM_VERSION" "$LOCAL_VERSION" | sort -V | tail -n1)" = "$NPM_VERSION" ] && [ "$NPM_VERSION" != "0.0.0" ]; then
|
|
106
|
-
echo "Syncing local version to $NPM_VERSION to avoid conflict"
|
|
107
|
-
npm version $NPM_VERSION --no-git-tag-version
|
|
108
|
-
fi
|
|
109
|
-
|
|
110
|
-
# Bump version (patch)
|
|
111
|
-
npm version patch --no-git-tag-version
|
|
112
|
-
|
|
113
|
-
NEW_VERSION=$(node -p "require('./package.json').version")
|
|
114
|
-
echo "New version to be published: $NEW_VERSION"
|
|
115
|
-
|
|
116
|
-
# Build the package
|
|
117
|
-
pnpm run build
|
|
118
|
-
|
|
119
|
-
# Publish to npm (using Trusted Publishing)
|
|
120
|
-
pnpm publish --provenance --access public --no-git-checks
|
|
121
|
-
|
|
122
|
-
# Go back to root for git operations
|
|
123
|
-
cd ../..
|
|
124
|
-
|
|
125
|
-
# After successful publish, commit the version change and tag it
|
|
126
|
-
git add packages/create-croissant/package.json
|
|
127
|
-
git commit -m "chore: release create-croissant v$NEW_VERSION [skip ci]"
|
|
128
|
-
git tag "v$NEW_VERSION"
|
|
129
|
-
|
|
130
|
-
# Push the version bump commit and tag back to main
|
|
131
|
-
git push origin main --follow-tags
|
|
132
|
-
|
|
133
|
-
# Create a GitHub Release
|
|
134
|
-
# --generate-notes automatically creates a changelog based on commits
|
|
135
|
-
# We use --target main to ensure the release is associated with the pushed branch
|
|
136
|
-
gh release create "v$NEW_VERSION" \
|
|
137
|
-
--target main \
|
|
138
|
-
--title "Release v$NEW_VERSION (create-croissant)" \
|
|
139
|
-
--generate-notes \
|
|
140
|
-
--latest
|
|
141
|
-
env:
|
|
142
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
143
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: Dependabot Auto-Merge
|
|
2
|
-
on: pull_request
|
|
3
|
-
|
|
4
|
-
permissions:
|
|
5
|
-
contents: write
|
|
6
|
-
pull-requests: write
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
dependabot:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
if: github.actor == 'dependabot[bot]'
|
|
12
|
-
steps:
|
|
13
|
-
- name: Dependabot metadata
|
|
14
|
-
id: metadata
|
|
15
|
-
uses: dependabot/fetch-metadata@v3
|
|
16
|
-
with:
|
|
17
|
-
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
18
|
-
- name: Enable auto-merge for Dependabot PRs
|
|
19
|
-
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
|
|
20
|
-
run: gh pr merge --auto --squash "$PR_URL"
|
|
21
|
-
env:
|
|
22
|
-
PR_URL: ${{github.event.pull_request.html_url}}
|
|
23
|
-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
package/template/.husky/pre-push
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
. "$(dirname "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
# Get the name of the branch being pushed
|
|
5
|
-
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
6
|
-
|
|
7
|
-
# Only run if pushing to main
|
|
8
|
-
if [ "$branch" = "main" ]; then
|
|
9
|
-
echo "Pushing to main branch, running CI checks..."
|
|
10
|
-
npm run ci
|
|
11
|
-
fi
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "recommendations": ["expo.vscode-expo-tools"] }
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Welcome to your Expo app 👋
|
|
2
|
-
|
|
3
|
-
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
|
|
4
|
-
|
|
5
|
-
## Get started
|
|
6
|
-
|
|
7
|
-
1. Install dependencies
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pnpm install
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
2. Start the app
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pnpm dlx expo start
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
In the output, you'll find options to open the app in a
|
|
20
|
-
|
|
21
|
-
- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
|
|
22
|
-
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
|
|
23
|
-
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
|
|
24
|
-
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
|
|
25
|
-
|
|
26
|
-
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
|
|
27
|
-
|
|
28
|
-
## Get a fresh project
|
|
29
|
-
|
|
30
|
-
When you're ready, run:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
pnpm run reset-project
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
|
|
37
|
-
|
|
38
|
-
## Learn more
|
|
39
|
-
|
|
40
|
-
To learn more about developing your project with Expo, look at the following resources:
|
|
41
|
-
|
|
42
|
-
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
|
|
43
|
-
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
|
|
44
|
-
|
|
45
|
-
## Join the community
|
|
46
|
-
|
|
47
|
-
Join our community of developers creating universal apps.
|
|
48
|
-
|
|
49
|
-
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
|
|
50
|
-
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Tabs } from "expo-router";
|
|
3
|
-
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
-
|
|
5
|
-
export default function TabLayout() {
|
|
6
|
-
return (
|
|
7
|
-
<Tabs
|
|
8
|
-
screenOptions={{
|
|
9
|
-
tabBarActiveTintColor: "#000",
|
|
10
|
-
tabBarInactiveTintColor: "#888",
|
|
11
|
-
headerShown: true,
|
|
12
|
-
}}
|
|
13
|
-
>
|
|
14
|
-
<Tabs.Screen
|
|
15
|
-
name="index"
|
|
16
|
-
options={{
|
|
17
|
-
title: "Dashboard",
|
|
18
|
-
tabBarIcon: ({ color, size }) => (
|
|
19
|
-
<Ionicons name="home" size={size} color={color} />
|
|
20
|
-
),
|
|
21
|
-
}}
|
|
22
|
-
/>
|
|
23
|
-
<Tabs.Screen
|
|
24
|
-
name="explore"
|
|
25
|
-
options={{
|
|
26
|
-
title: "Explore",
|
|
27
|
-
tabBarIcon: ({ color, size }) => (
|
|
28
|
-
<Ionicons name="planet" size={size} color={color} />
|
|
29
|
-
),
|
|
30
|
-
}}
|
|
31
|
-
/>
|
|
32
|
-
<Tabs.Screen
|
|
33
|
-
name="account"
|
|
34
|
-
options={{
|
|
35
|
-
title: "Account",
|
|
36
|
-
tabBarIcon: ({ color, size }) => (
|
|
37
|
-
<Ionicons name="person" size={size} color={color} />
|
|
38
|
-
),
|
|
39
|
-
}}
|
|
40
|
-
/>
|
|
41
|
-
</Tabs>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
import { View, Text, StyleSheet, ScrollView, Alert, ActivityIndicator } from "react-native";
|
|
3
|
-
import { useRouter } from "expo-router";
|
|
4
|
-
import { authClient } from "@/lib/auth-client";
|
|
5
|
-
import { Button } from "@/components/ui/button";
|
|
6
|
-
import { Input } from "@/components/ui/input";
|
|
7
|
-
|
|
8
|
-
export default function AccountScreen() {
|
|
9
|
-
const router = useRouter();
|
|
10
|
-
const { data: session, isPending } = authClient.useSession();
|
|
11
|
-
const [updating, setUpdating] = useState(false);
|
|
12
|
-
|
|
13
|
-
// Form states
|
|
14
|
-
const [name, setName] = useState("");
|
|
15
|
-
const [email, setEmail] = useState("");
|
|
16
|
-
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (!isPending && !session) {
|
|
19
|
-
router.replace("/login");
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (session) {
|
|
24
|
-
setName(session.user.name);
|
|
25
|
-
setEmail(session.user.email);
|
|
26
|
-
}
|
|
27
|
-
}, [session, isPending, router]);
|
|
28
|
-
|
|
29
|
-
const handleUpdateProfile = async () => {
|
|
30
|
-
if (!name) {
|
|
31
|
-
Alert.alert("Error", "Name is required");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
setUpdating(true);
|
|
36
|
-
try {
|
|
37
|
-
const { error } = await authClient.updateUser({
|
|
38
|
-
name,
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
if (error) {
|
|
42
|
-
Alert.alert("Error", error.message || "Failed to update profile");
|
|
43
|
-
} else {
|
|
44
|
-
Alert.alert("Success", "Profile updated successfully");
|
|
45
|
-
}
|
|
46
|
-
} catch (err) {
|
|
47
|
-
Alert.alert("Error", "An unexpected error occurred");
|
|
48
|
-
} finally {
|
|
49
|
-
setUpdating(false);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
if (isPending) {
|
|
54
|
-
return (
|
|
55
|
-
<View style={styles.center}>
|
|
56
|
-
<ActivityIndicator size="large" color="#000" />
|
|
57
|
-
</View>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
|
|
63
|
-
<Text style={styles.title}>Account Settings</Text>
|
|
64
|
-
|
|
65
|
-
<View style={styles.section}>
|
|
66
|
-
<Text style={styles.sectionTitle}>Profile Information</Text>
|
|
67
|
-
<View style={styles.form}>
|
|
68
|
-
<Input
|
|
69
|
-
label="Name"
|
|
70
|
-
value={name}
|
|
71
|
-
onChangeText={setName}
|
|
72
|
-
placeholder="Your name"
|
|
73
|
-
/>
|
|
74
|
-
<Input
|
|
75
|
-
label="Email"
|
|
76
|
-
value={email}
|
|
77
|
-
editable={false}
|
|
78
|
-
style={styles.disabledInput}
|
|
79
|
-
/>
|
|
80
|
-
<Button
|
|
81
|
-
onPress={handleUpdateProfile}
|
|
82
|
-
loading={updating}
|
|
83
|
-
style={styles.button}
|
|
84
|
-
>
|
|
85
|
-
Update Profile
|
|
86
|
-
</Button>
|
|
87
|
-
</View>
|
|
88
|
-
</View>
|
|
89
|
-
|
|
90
|
-
<View style={styles.section}>
|
|
91
|
-
<Text style={styles.sectionTitle}>Security</Text>
|
|
92
|
-
<Text style={styles.infoText}>
|
|
93
|
-
Password management and other security settings are currently available on the web platform.
|
|
94
|
-
</Text>
|
|
95
|
-
</View>
|
|
96
|
-
</ScrollView>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const styles = StyleSheet.create({
|
|
101
|
-
container: {
|
|
102
|
-
flex: 1,
|
|
103
|
-
backgroundColor: "#fff",
|
|
104
|
-
},
|
|
105
|
-
content: {
|
|
106
|
-
padding: 24,
|
|
107
|
-
},
|
|
108
|
-
center: {
|
|
109
|
-
flex: 1,
|
|
110
|
-
justifyContent: "center",
|
|
111
|
-
alignItems: "center",
|
|
112
|
-
},
|
|
113
|
-
title: {
|
|
114
|
-
fontSize: 28,
|
|
115
|
-
fontWeight: "bold",
|
|
116
|
-
marginBottom: 24,
|
|
117
|
-
},
|
|
118
|
-
section: {
|
|
119
|
-
marginBottom: 32,
|
|
120
|
-
},
|
|
121
|
-
sectionTitle: {
|
|
122
|
-
fontSize: 18,
|
|
123
|
-
fontWeight: "600",
|
|
124
|
-
marginBottom: 16,
|
|
125
|
-
color: "#333",
|
|
126
|
-
},
|
|
127
|
-
form: {
|
|
128
|
-
gap: 16,
|
|
129
|
-
},
|
|
130
|
-
disabledInput: {
|
|
131
|
-
backgroundColor: "#f5f5f5",
|
|
132
|
-
color: "#888",
|
|
133
|
-
},
|
|
134
|
-
button: {
|
|
135
|
-
marginTop: 8,
|
|
136
|
-
},
|
|
137
|
-
infoText: {
|
|
138
|
-
fontSize: 14,
|
|
139
|
-
color: "#666",
|
|
140
|
-
lineHeight: 20,
|
|
141
|
-
backgroundColor: "#f9f9f9",
|
|
142
|
-
padding: 16,
|
|
143
|
-
borderRadius: 8,
|
|
144
|
-
borderWidth: 1,
|
|
145
|
-
borderColor: "#eee",
|
|
146
|
-
},
|
|
147
|
-
});
|