Skip to content

Commit

Permalink
Feat(p-audio): Style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vija02 committed Jan 30, 2025
1 parent 6b26d62 commit 8c940c9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const RecordingCard = ({ recording }: { recording: Recording }) => {
}

return (
<Stack direction="column">
<Stack direction="column" py={2}>
<Stack direction="row" justifyContent="space-between">
<Stack direction="row" alignItems="center">
<Button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
import { Stack, Text } from "@chakra-ui/react";
import { useMemo } from "react";

import { usePluginAPI } from "../../pluginApi";
import { RecordingCard } from "./RecordingCard";

export const RecordingSection = () => {
const pluginApi = usePluginAPI();
const recordings = pluginApi.scene.useData((x) => x.pluginData.recordings);

const endedRecordings = useMemo(
() => recordings.filter((x) => x.status === "ended"),
[recordings],
);

return (
<>
{recordings
.filter((x) => x.status === "ended")
.map((recording) => (
{endedRecordings.length === 0 && <Text>Nothing here yet.</Text>}
<Stack direction="column" spacing={4}>
{endedRecordings.map((recording) => (
<RecordingCard key={recording.mediaId} recording={recording} />
))}
</Stack>
</>
);
};
2 changes: 1 addition & 1 deletion plugins/audio-recorder/view/AudioRecorderRemote/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const AudioRecorderRemoteInner = () => {
<Heading>Streams</Heading>
<StreamSection />
<Heading as="h3" size="md">
Current Recordings
Recordings
</Heading>
<RecordingSection />
</Stack>
Expand Down

0 comments on commit 8c940c9

Please sign in to comment.