Skip to content

Commit

Permalink
Merge branch 'preview'
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelfan committed Jan 29, 2024
2 parents 68b4376 + 7052151 commit ee990d8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const metadata: Metadata = {
description: "List",
};

export default function FeedLayout({
export default function ListsLayout({
children,
}: {
children: React.ReactNode;
Expand Down
14 changes: 14 additions & 0 deletions src/app/dashboard/user/[handle]/lists/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "Ouranos — List",
description: "List",
};

export default function ListsLayout({
children,
}: {
children: React.ReactNode;
}) {
return <>{children}</>;
}
9 changes: 6 additions & 3 deletions src/components/contentDisplay/listItem/ListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { ListView } from "@atproto/api/dist/client/types/app/bsky/graph/defs";
import Image from "next/image";
import Link from "next/link";
Expand All @@ -10,17 +12,18 @@ interface Props {
export default function ListItem(props: Props) {
const { list } = props;
const { avatar, name, description, creator, uri, viewer, indexedAt } = list;
const formattedUri = uri.split(":")[3].split("/")[2];

return (
<Link
href={{
pathname: `/dashboard/user/${creator.handle}/lists/${encodeURIComponent(formattedUri)}`,
pathname: `/dashboard/user/${creator.handle}/lists/${encodeURIComponent(
uri.split(":")[3].split("/")[2]
)}`,
query: { uri: uri },
}}
className="flex flex-col gap-2 border border-x-0 p-3 last:border-b hover:bg-neutral-50 md:border-x md:first:rounded-t-2xl md:last:rounded-b-2xl odd:[&:not(:last-child)]:border-b-0 even:[&:not(:last-child)]:border-b-0"
>
<div className="flex flex-wrap items-center justify-between gap-3">
<div className="flex flex-wrap items-center justify-between gap-3">
<div className="flex flex-wrap items-center gap-3">
<Image
src={avatar ?? FallbackList}
Expand Down
2 changes: 0 additions & 2 deletions src/components/dataDisplay/postEmbed/FeedEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { AppBskyFeedDefs } from "@atproto/api";
import FallbackFeed from "@/assets/images/fallbackFeed.png";
import { BiSolidHeart } from "react-icons/bi";
import Link from "next/link";
import { useRouter } from "next/navigation";

interface Props {
feed: AppBskyFeedDefs.GeneratorView;
Expand All @@ -12,7 +11,6 @@ interface Props {

export default function FeedEmbed(props: Props) {
const { feed, depth } = props;
const router = useRouter();

return (
<>
Expand Down
4 changes: 3 additions & 1 deletion src/containers/lists/ListContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export default function ListContainer(props: Props) {
<div
role="tablist"
aria-orientation="horizontal"
className={`no-scrollbar flex flex-nowrap gap-3 overflow-auto border border-t-0 ${currenTab === "posts" ? "border-b" : "border-b-0"} px-3 pt-3`}
className={`no-scrollbar flex flex-nowrap gap-3 overflow-auto border border-t-0 ${
currenTab === "posts" ? "border-b" : "border-b-0"
} px-3 pt-3`}
>
<button
role="tab"
Expand Down

0 comments on commit ee990d8

Please sign in to comment.