Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "p-pick",
"private": true,
"version": "0.0.0",
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
3 changes: 1 addition & 2 deletions src/features/bookmark/ui/BookmarkButtonContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useSuspenseQuery } from '@tanstack/react-query';

import { BookmarkLoader } from '@/features/bookmark';
import { authOptions } from '@/entities/auth';
import { commonSVG } from '@/assets';

interface BookmarkButtonContainerProps {
contentId: string;
Expand All @@ -17,7 +16,7 @@ export default function BookmarkButtonContainer({
}: BookmarkButtonContainerProps) {
const { data: auth } = useSuspenseQuery(authOptions.auth());

if (!auth) return <commonSVG.BookMarkIcon className="text-white" />;
if (!auth) return null;

return <BookmarkLoader uid={auth.uid} contentId={contentId} />;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { BookmarkButtonContainer } from '@/features/bookmark';
import type { TourSummary } from '../../types';
import { GoToAroundTouristButton } from './';
import { getAuth } from 'firebase/auth';

interface OverlayButtonGroupProps {
goToAroundTouristButtonProps: TourSummary;
Expand All @@ -9,14 +10,18 @@ interface OverlayButtonGroupProps {
export default function SideButtonGroupContainer({
goToAroundTouristButtonProps,
}: OverlayButtonGroupProps) {
const auth = getAuth();

return (
<div className="absolute bottom-1/2 right-0 z-100 flex flex-col gap-5 pr-[19px]">
<GoToAroundTouristButton {...goToAroundTouristButtonProps} />
<span className="flex items-center justify-center w-10 h-10 bg-white rounded-full cursor-pointer">
<BookmarkButtonContainer
contentId={goToAroundTouristButtonProps.contentid}
/>
</span>
{auth.currentUser && (
<span className="flex items-center justify-center w-10 h-10 bg-white rounded-full">
<BookmarkButtonContainer
contentId={goToAroundTouristButtonProps.contentid}
/>
</span>
)}
</div>
);
}