# All files / src/components/scenes ProblemScene.tsx

11.11% Statements 1/9
0% Branches 0/2
0% Functions 0/2
11.11% Lines 1/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148

    1x

     import React from "react";
    import {
      AbsoluteFill,
      useCurrentFrame,
      useVideoConfig,
      spring,
      interpolate,
    } from "remotion";

    interface ProblemSceneProps {
      problems: string[];
      primaryColor?: string;
      title?: string;
    }

    export const ProblemScene: React.FC<ProblemSceneProps> = ({
      problems,
      primaryColor = "#ef4444",
      title = "Before OrchestKit",
    }) => {
      const frame = useCurrentFrame();
      const { fps } = useVideoConfig();

      const titleScale = spring({
        frame,
        fps,
        config: { damping: 80, stiffness: 200 },
      });

      return (
        <AbsoluteFill
          style={{
            justifyContent: "center",
            alignItems: "center",
            backgroundColor: "#0a0a0f",
          }}
        >
          {/* Subtle red warning glow */}
          <AbsoluteFill
            style={{
              background: `radial-gradient(ellipse at center, ${primaryColor}10 0%, transparent 60%)`,
            }}
          />

          <div
            style={{
              display: "flex",
              flexDirection: "column",
              alignItems: "center",
              gap: 32,
              maxWidth: 1000,
            }}
          >
            {/* Title */}
            <div
              style={{
                transform: `scale(${titleScale})`,
                opacity: Math.min(1, frame / 10),
              }}
            >
              <h2
                style={{
                  fontSize: 28,
                  color: "#6b7280",
                  fontFamily: "Inter, system-ui",
                  fontWeight: 500,
                  textTransform: "uppercase",
                  letterSpacing: "0.1em",
                  margin: 0,
                }}
              >
                {title}
              </h2>
            </div>

            {/* Problem List */}
            <div
              style={{
                display: "flex",
                flexDirection: "column",
                gap: 20,
              }}
            >
              {problems.map((problem, index) => {
                const itemDelay = 15 + index * 12;
                const itemScale = spring({
                  frame: Math.max(0, frame - itemDelay),
                  fps,
                  config: { damping: 80, stiffness: 200 },
                });
                const itemOpacity = interpolate(
                  frame,
                  [itemDelay, itemDelay + 10],
                  [0, 1],
                  { extrapolateRight: "clamp" }
                );

                return (
                  <div
                    key={index}
                    style={{
                      display: "flex",
                      alignItems: "center",
                      gap: 16,
                      transform: `scale(${itemScale})`,
                      opacity: itemOpacity,
                    }}
                  >
                    {/* X Icon */}
                    <div
                      style={{
                        width: 32,
                        height: 32,
                        borderRadius: 8,
                        backgroundColor: `${primaryColor}20`,
                        border: `2px solid ${primaryColor}`,
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                        fontSize: 18,
                        color: primaryColor,
                        fontWeight: 700,
                        flexShrink: 0,
                      }}
                    >
                      ✗
                    </div>

                    {/* Problem Text */}
                    <span
                      style={{
                        fontSize: 26,
                        color: "#e5e7eb",
                        fontFamily: "Inter, system-ui",
                        fontWeight: 400,
                      }}
                    >
                      {problem}
                    </span>
                  </div>
                );
              })}
            </div>
          </div>
        </AbsoluteFill>
      );
    };