Skip to content

Commit

Permalink
fix "New post" button appears without login with actor
Browse files Browse the repository at this point in the history
  • Loading branch information
emredevsalot committed Aug 22, 2023
1 parent aa6e9c6 commit de8e801
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/kampus/app/pano/PanoFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const fragment = graphql`
const viewerFragment = graphql`
fragment PanoFeed_viewer on Viewer {
...PostItem_viewer
actor {
displayName
}
}
`;

Expand All @@ -49,6 +52,8 @@ export function PanoFeed(props: Props) {
props.panoFeed
);
const viewer = useFragment(viewerFragment, props.panoViewer);
// I get undefined here.
console.log(viewer?.actor);

const feed = data.panoFeed;

Expand Down
3 changes: 3 additions & 0 deletions apps/kampus/app/pano/__generated__/PanoFeed_viewer.graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit de8e801

Please sign in to comment.