From 37da0ed69b930fec37d073a8cdfac93341503e43 Mon Sep 17 00:00:00 2001 From: sai80082 Date: Tue, 3 Dec 2024 21:56:51 +0530 Subject: [PATCH] feat: updated UI for rewind. --- remotion/Root.tsx | 2 +- src/pages/rewind.tsx | 77 ++++++++++++++++++++++++++++---------------- 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/remotion/Root.tsx b/remotion/Root.tsx index 67d4ada..9fa8334 100644 --- a/remotion/Root.tsx +++ b/remotion/Root.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Composition } from 'remotion'; import { IntroComposition, Scene } from './Composition'; -const scenes: Scene[] = [ +export const scenes: Scene[] = [ { message: "Welcome Varun!", type: "WELCOME", emoji: "👋", diff --git a/src/pages/rewind.tsx b/src/pages/rewind.tsx index de91892..77f7d00 100644 --- a/src/pages/rewind.tsx +++ b/src/pages/rewind.tsx @@ -1,33 +1,54 @@ -import React from 'react' -import { Player } from '@remotion/player'; +import { Player } from "@remotion/player"; +import { IntroComposition } from "../../remotion/Composition"; +import { scenes } from "../../remotion/Root"; +import { Button } from "@/components/ui/button"; -import { IntroComposition } from '../../remotion/Composition'; - -const scenes = [ - { message: "Welcome to Immich Replay Varun!" }, - { message: "2024! So much memories!" }, - { message: "You've been to 10 new countries!" }, - { message: "And 25 new cities!" }, - { message: "Here are some of my favorite memories from this year!" }, - { message: "The most memory filled album of all time!" }, - { message: "You made so much memory with Soundarapandian"}, -] export default function RewindPage() { + const playerProps = { + component: IntroComposition, + inputProps: { scenes }, + durationInFrames: scenes.length * 120, + compositionWidth: 720, + compositionHeight: 1280, + fps: 30, + controls: true, + autoPlay: true + }; + + const renderButton = (className = "") => ( + + ); + return ( -
- +
+

Your 2024 Rewind

+
+ +
+ +
+
+

Ready to create your video?

+

+ Click the button below to render your personalized 2024 rewind video! +

+ {renderButton("w-full lg:w-auto px-8 py-4")} +
+
- ) + ); }