Skip to content

Commit

Permalink
fix: switching between users spaces is more obvious now (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiporox authored Jul 4, 2024
1 parent e35378d commit cb88e8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/common/components/pages/SpacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type SpacePageArgs = {
commitConfig?: () => Promise<void>;
resetConfig?: () => Promise<void>;
profile?: ReactNode;
loading?: boolean;
};

export default function SpacePage({
Expand All @@ -18,6 +19,7 @@ export default function SpacePage({
commitConfig,
resetConfig,
profile,
loading,
}: SpacePageArgs) {
const [editMode, setEditMode] = useState(false);
const [sidebarEditable, setSidebarEditable] = useState(false);
Expand All @@ -44,7 +46,8 @@ export default function SpacePage({
{isUndefined(config) ||
isUndefined(saveConfig) ||
isUndefined(commitConfig) ||
isUndefined(resetConfig) ? (
isUndefined(resetConfig) ||
loading ? (
<SpaceLoading />
) : (
<Space
Expand Down
1 change: 1 addition & 0 deletions src/common/components/pages/UserDefinedSpace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export default function UserDefinedSpace({
commitConfig={commitConfig}
resetConfig={resetConfig}
profile={profile}
loading={loading}
/>
);
}
9 changes: 6 additions & 3 deletions src/fidgets/farcaster/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ export const FEED_TYPES = [
{ name: "Filter", value: FeedType.Filter },
];

const Feed: React.FC<FidgetArgs<FeedFidgetSettings>> = ({
settings: { feedType, users, channel, filterType },
}) => {
const Feed: React.FC<FidgetArgs<FeedFidgetSettings>> = ({ settings }) => {
const { feedType, users, channel, filterType } = settings;
const { fid } = useFarcasterSigner("feed");
const {
data,
Expand All @@ -126,6 +125,10 @@ const Feed: React.FC<FidgetArgs<FeedFidgetSettings>> = ({
}
}, [inView]);

useEffect(() => {
setShowCastThreadView(false);
}, [settings]);

const onSelectCast = (hash: string) => {
setSelectedCastHash(hash);
setShowCastThreadView(true);
Expand Down

0 comments on commit cb88e8b

Please sign in to comment.