refactor: update module resolution, fix Stepper layout, improve Button prop typing, and update database diagnostic script

This commit is contained in:
2026-05-05 17:03:24 +01:00
parent bdd9722c83
commit 34d4fb6033
4 changed files with 20 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { TouchableOpacity, Text, StyleSheet, ActivityIndicator, ViewStyle, TextStyle } from 'react-native';
import { TouchableOpacity, Text, StyleSheet, ActivityIndicator, ViewStyle, TextStyle, StyleProp } from 'react-native';
type Props = {
children: React.ReactNode;
@@ -8,8 +8,8 @@ type Props = {
size?: 'sm' | 'md' | 'lg';
disabled?: boolean;
loading?: boolean;
style?: ViewStyle;
textStyle?: TextStyle;
style?: StyleProp<ViewStyle>;
textStyle?: StyleProp<TextStyle>;
};
export const Button = ({ children, onPress, variant = 'solid', size = 'md', disabled, loading, style, textStyle }: Props) => {

View File

@@ -136,8 +136,6 @@ const styles = StyleSheet.create({
lineBackground: {
position: 'absolute',
top: 15, // Half of circle height (30/2)
left: 40, // Center of first circle (20 horizontal padding + 30 step container width / 2) -> wait
// Let's use a more robust calculation
left: 50, // approx center of first circle (20 padding + 60/2)
right: 50, // approx center of last circle
height: 2,

View File

@@ -5,6 +5,6 @@
"jsx": "react-native",
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node"
"moduleResolution": "bundler"
}
}

View File

@@ -1,4 +1,4 @@
const { createClient } = require('@supabase/supabase-js');
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = 'https://jqklhhpyykzrktikjnmb.supabase.co';
const supabaseAnonKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Impxa2xoaHB5eWt6cmt0aWtqbm1iIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjgzODQ0MDgsImV4cCI6MjA4Mzk2MDQwOH0.QsPuBnyUtRPSavlqKj3IGR9c8juT02LY_hSi-j3c6M0';
@@ -6,11 +6,22 @@ const supabaseAnonKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYm
const supabase = createClient(supabaseUrl, supabaseAnonKey);
async function check() {
const { data, error } = await supabase.from('shops').select('*').limit(1);
if (error) {
console.log("DB ERROR:", error);
const { data, error } = await supabase.from('profiles').select('*').limit(0);
const { data: cols, error: colError } = await supabase.rpc('get_table_columns', { table_name: 'profiles' });
// If RPC doesn't exist, try a different way
if (colError) {
console.log("RPC Error (likely doesn't exist):", colError.message);
// Try to insert a row with a wrong column to see what columns exist in the error message? No.
// Let's just try to select one of each suspected column.
const { data: testData, error: testError } = await supabase.from('shops').select('*').limit(1);
if (testError) {
console.log("SELECT ERROR:", testError.message);
} else {
console.log("COLUMNS EXIST IN SHOPS:", testData && testData.length > 0 ? Object.keys(testData[0]) : "No rows");
}
} else {
console.log("COLUMNS:", data && data.length > 0 ? Object.keys(data[0]) : "No rows returned");
console.log("COLUMNS:", cols);
}
process.exit(0);
}