fix of the day, payment + sub + music generation

This commit is contained in:
Thomas Demirdjian
2025-11-17 14:27:15 +01:00
parent 97321cdbda
commit 93f2711574
20 changed files with 761 additions and 398 deletions
+4 -2
View File
@@ -3,7 +3,7 @@ import React from "react";
import { Image, Pressable, Text, View } from "react-native";
import { Palette, Style } from "../styles";
import { FONT_FAMILY } from "../styles/Fonts";
import { size } from "../styles/Style";
import { size as sizeStyle } from "../styles/Style";
import BorderGradient from "./BorderGradient/BorderGradient";
const HEIGHT_BY_SIZE = {
@@ -84,7 +84,9 @@ const BorderGradientButton = ({
gap: 11,
}}
>
{icon && <Image source={icon} style={size({ size: iconSize })} />}
{icon && (
<Image source={icon} style={sizeStyle({ size: iconSize })} />
)}
<Text
style={{
fontSize,
+16 -5
View File
@@ -8,23 +8,34 @@ const ProgressBar = ({
progress = 0,
containerStyle = {},
gradient = false,
status = "default",
}) => {
const numericProgress = Number(progress);
const normalizedProgress = Math.max(
0,
Math.min(100, Number.isFinite(numericProgress) ? numericProgress : 0),
);
const isError = status === "error";
const containerBackground = isError ? "#3C101B" : "#0F0C19";
const fillColor = isError ? "#FF6B6B" : Palette.white;
const shouldUseGradient = gradient && !isError;
return (
<View
style={{
width: "100%",
height: 5,
backgroundColor: "#0F0C19",
backgroundColor: containerBackground,
borderRadius: mainBorderRadius,
overflow: "hidden",
...containerStyle,
}}
>
{gradient ? (
{shouldUseGradient ? (
<LinearGradient
colors={["#F94697", "#7023F7"]}
style={{
width: `${progress}%`,
width: `${normalizedProgress}%`,
height: "100%",
borderRadius: mainBorderRadius,
}}
@@ -34,9 +45,9 @@ const ProgressBar = ({
) : (
<View
style={{
width: `${progress}%`,
width: `${normalizedProgress}%`,
height: "100%",
backgroundColor: Palette.white,
backgroundColor: fillColor,
borderRadius: mainBorderRadius,
}}
/>