Skip to content

Commit

Permalink
Merge branch 'justinxue/phs-49-exhibit-page' of github.com:calbluepri…
Browse files Browse the repository at this point in the history
…nt/phs into justinxue/phs-49-exhibit-page
  • Loading branch information
jxmoose committed May 22, 2024
2 parents 4e4acf5 + 6a30121 commit 5cd000c
Show file tree
Hide file tree
Showing 6 changed files with 375 additions and 358 deletions.
19 changes: 16 additions & 3 deletions src/components/userComponents/BackButton/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { BackArrow } from '../../../../public/icons';

/**
* @param evt on click of button
Expand All @@ -16,9 +15,23 @@ function goBack(evt: React.SyntheticEvent) {
*/
export default function BackButton() {
return (
<button type="button" onClick={goBack} className="text-scary-forest">
<button type="button" onClick={goBack}>
{' '}
<BackArrow />
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
>
<path
className="stroke-scary-forest active:stroke-[#223a1d]"
d="M17.5 10H2.5M2.5 10L6.66667 14.1667M2.5 10L6.66667 5.83337"
strokeWidth="1.65"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</button>
);
}
3 changes: 0 additions & 3 deletions src/components/userComponents/SiteMap/DisplayPreviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import Link from 'next/link';
import Image from 'next/image';
import { ExhibitWithCategoryRow, TourRow } from '../../../types/types';
import { fetchImagesForTour } from '../../../supabase/media/queries';
import { fetchExhibitImage } from '../../../supabase/exhibits/queries';
import { CloseIcon } from '../../../../public/icons';

interface DisplayCardProps {
tour: TourRow | ExhibitWithCategoryRow;
Expand Down Expand Up @@ -64,7 +62,6 @@ function DisplayPreviewCard({
// const imageObj = await fetchExhibitImage(tour.id);
// if (imageObj) {
imageUrl = tour.image;
console.log(tour);
// }
displayName = tour.category;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/userComponents/SiteMap/SiteMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { renderToStaticMarkup } from 'react-dom/server';

import { fetchAllSpotlights } from '../../../supabase/tours/queries';
import { ExhibitWithCategoryRow, TourRow } from '../../../types/types';

import Control from './Control';
import DisplayPreviewCard from './DisplayPreviewCard';
import { fetchAllExhibits } from '../../../supabase/exhibits/queries';
import { getCategoryColor1 } from '../../../supabase/category/queries';
import RecenterMap from './MapInteractionHandler';
Expand Down
20 changes: 16 additions & 4 deletions src/components/userComponents/navBar/navBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,22 @@ export default function NavBar() {
>
Wildlife Spotlights
</Link>
<Link
href="/newsFeedPage"
className="text-night font-lato text-lg font-bold block relative left-4 mt-[1.25rem]"
>
<Link href="/exhibitsPage" className="block mb-2 text-black">
Exhibits
</Link>
<Link href="/qrCodeTourPage" className="block text-black">
QR Code Tour
</Link>
<Link href="/qrCodeScanner" className="block text-black">
QR Scanner
</Link>
</ul>
<h1 className="text-xl text-black font-bold p-4">LEARN & EXPLORE</h1>
<ul className="p-4">
<Link href="/collectionsPage" className="block mb-2 text-black">
Collections
</Link>
<Link href="/newsFeedPage" className="block mb-2 text-black">
News Feed
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/supabase/exhibits/queries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function fetchExhibitImage(
exhibitId: string,
): Promise<{ image: string }> {
const { data, error } = await supabase
.from('exhibits')
.from('categories')
.select('image')
.eq('id', exhibitId)
.single();
Expand Down
Loading

0 comments on commit 5cd000c

Please sign in to comment.