From d71dc8e1afc431f249c29950b01a41f4f1b0ca69 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 9 Apr 2024 19:01:29 +0700 Subject: [PATCH] sync demo --- app/components/SortFilter.tsx | 2 +- app/routes/($locale).$.tsx | 18 ++++---- app/routes/($locale)._index.tsx | 19 ++++----- app/sections/user-profiles/index.tsx | 61 ++++++++++++++++++++++++++++ app/weaverse/components.ts | 6 ++- 5 files changed, 86 insertions(+), 20 deletions(-) create mode 100644 app/sections/user-profiles/index.tsx diff --git a/app/components/SortFilter.tsx b/app/components/SortFilter.tsx index 1056d5d..6b67929 100644 --- a/app/components/SortFilter.tsx +++ b/app/components/SortFilter.tsx @@ -346,7 +346,7 @@ export default function SortMenu() { className="absolute right-0 flex flex-col p-4 text-right rounded-sm bg-contrast" > {items.map((item) => ( - + {() => ( { + return ( +
+ Profile picture +
+

+ Emily Johnson +

+

+ Front-end Developer +

+

+ Passionate about creating interactive user interfaces. +

+
+ + +
+
+
+ ); +}; + +interface UserProfilesProps extends HydrogenComponentProps {} +const UserProfiles = forwardRef( + (props, ref) => { + return ( +
+ +
+ ); + }, +); + +export const schema: HydrogenComponentSchema = { + title: 'User Profiles', + type: 'user-profiles', + inspector: [], +}; + +export default UserProfiles; diff --git a/app/weaverse/components.ts b/app/weaverse/components.ts index c3406d2..b63ffe1 100644 --- a/app/weaverse/components.ts +++ b/app/weaverse/components.ts @@ -43,7 +43,8 @@ import * as SlideShowItem from '~/sections/SlideShow/SlideItems'; import * as NewsLetter from '~/sections/newsletter'; import * as ImageHotspot from '~/sections/image-hotspots/image-hotspot'; import * as ImageHotspotItem from '~/sections/image-hotspots/items'; -import * as ProductList from '~/sections/product-list' +import * as ProductList from '~/sections/product-list'; +import * as UserProfiles from '~/sections/user-profiles'; export let components: HydrogenComponent[] = [ ...commonComponents, @@ -71,6 +72,7 @@ export let components: HydrogenComponent[] = [ CountDownTimer, CountdownActions, NewsLetter, + UserProfiles, Blogs, BlogPost, AllProducts, @@ -92,5 +94,5 @@ export let components: HydrogenComponent[] = [ MetaDemo, SlideShow, SlideShowItem, - ProductList + ProductList, ];