create-ern-boilerplate 0.0.14 → 0.0.16
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/create.js +3 -3
- package/package.json +1 -1
- package/templates/default/app/(auth)/login.tsx +2 -2
- package/templates/default/app/(protected)/_layout.tsx +0 -15
- package/templates/default/app/(protected)/home.tsx +350 -195
- package/templates/default/app/(protected)/settings.tsx +11 -0
- package/templates/default/server/db.json +37 -27
- package/templates/default/src/components/shared/LucideIcon.tsx +18 -0
- package/templates/default/src/services/mockApi/categories.mock.ts +75 -0
- package/templates/default/src/services/mockApi/index.ts +27 -0
- package/templates/default/src/services/mockApi/products.mock.ts +125 -0
- package/templates/default/src/services/productService.ts +143 -0
- package/templates/default/src/types/product.types.ts +49 -0
- package/templates/default/src/utils/constants.ts +2 -2
- /package/templates/default/app/{(protected) → (admin)}/profile.tsx +0 -0
package/create.js
CHANGED
|
@@ -153,13 +153,13 @@ async function main() {
|
|
|
153
153
|
console.log(`
|
|
154
154
|
${chalk.green("🎉 Selesai!")}
|
|
155
155
|
Langkah selanjutnya:
|
|
156
|
-
${chalk.cyan(`
|
|
156
|
+
${chalk.cyan(`boilerplate ${projectName} berhasil dibuat, silahkan mulai code berdasarkan kebutuhan anda... atau sesuaikan aja`)}
|
|
157
157
|
${
|
|
158
158
|
autoInstall
|
|
159
159
|
? chalk.dim("(dependencies sudah terinstall ✅)")
|
|
160
|
-
: chalk.cyan("
|
|
160
|
+
: chalk.cyan("")
|
|
161
161
|
}
|
|
162
|
-
${chalk.cyan("
|
|
162
|
+
${chalk.cyan("")}
|
|
163
163
|
|
|
164
164
|
Happy coding! 💻
|
|
165
165
|
`);
|
package/package.json
CHANGED
|
@@ -33,8 +33,8 @@ const STORED_PASSWORD_KEY = 'stored_password';
|
|
|
33
33
|
export default function LoginScreen() {
|
|
34
34
|
const { login } = useAuth();
|
|
35
35
|
const { colors } = useTheme();
|
|
36
|
-
const [email, setEmail] = useState('
|
|
37
|
-
const [password, setPassword] = useState('
|
|
36
|
+
const [email, setEmail] = useState('');
|
|
37
|
+
const [password, setPassword] = useState('');
|
|
38
38
|
const [showPassword, setShowPassword] = useState(false);
|
|
39
39
|
const [errors, setErrors] = useState({ email: '', password: '' });
|
|
40
40
|
const [loading, setLoading] = useState(false);
|
|
@@ -62,21 +62,6 @@ export default function MainLayout() {
|
|
|
62
62
|
}}
|
|
63
63
|
/>
|
|
64
64
|
|
|
65
|
-
<Tabs.Screen
|
|
66
|
-
name="profile"
|
|
67
|
-
options={{
|
|
68
|
-
title: 'Profile',
|
|
69
|
-
tabBarIcon: ({ color, focused }) => (
|
|
70
|
-
<View style={[
|
|
71
|
-
styles.iconContainer,
|
|
72
|
-
focused && { backgroundColor: `${colors.primary}15` }
|
|
73
|
-
]}>
|
|
74
|
-
<User size={24} color={color} strokeWidth={focused ? 2.5 : 2} />
|
|
75
|
-
</View>
|
|
76
|
-
),
|
|
77
|
-
}}
|
|
78
|
-
/>
|
|
79
|
-
|
|
80
65
|
<Tabs.Screen
|
|
81
66
|
name="settings"
|
|
82
67
|
options={{
|