Merge branch 'release003' into ali

This commit is contained in:
Vladislav Khorev 2024-02-24 13:02:06 +00:00
commit 721e8506dd
11 changed files with 37 additions and 54 deletions

View File

@ -30,6 +30,7 @@ const AboutUs = () => {
</ul> </ul>
</p> </p>
</div> </div>
<p>Photo By Mzximvs VdB from Brussels, belgium - Road to Issyk-Kul (south shore), CC BY-SA 2.0</p>;
</div> </div>
); );
}; };

View File

@ -12,7 +12,3 @@ export interface IReview {
review: string; review: string;
created_at: string; created_at: string;
} }
export interface IReviewList extends IList {
results: IReview[];
}

View File

@ -8,22 +8,8 @@ import facebook from "./icons/facebook.svg";
import instagram from "./icons/instagram.svg"; import instagram from "./icons/instagram.svg";
import app_store_btn from "./icons/app-store-btn.svg"; import app_store_btn from "./icons/app-store-btn.svg";
import play_market_btn from "./icons/play-market-btn.svg"; import play_market_btn from "./icons/play-market-btn.svg";
import { usePathname } from 'next/navigation';
const Footer = () => { const Footer = () => {
const pathname = usePathname();
const isHomePage = pathname === '/';
const isAboutPage = pathname === '/about';
let creditsInFooter;
if (isHomePage) {
creditsInFooter = <p className="text-white">Photo By ThomasG, CC BY-SA 3.0</p>;
} else if (isAboutPage) {
creditsInFooter = <p className="text-white">Photo By Mzximvs VdB from Brussels, belgium - Road to Issyk-Kul (south shore), CC BY-SA 2.0</p>;
} else {
creditsInFooter = <p></p>;
}
return ( return (
<footer className="footer"> <footer className="footer">
<Link href="/"> <Link href="/">
@ -55,7 +41,7 @@ const Footer = () => {
))} ))}
</li> </li>
</ul> </ul>
{creditsInFooter} <p className="text-white">Photo By ThomasG, CC BY-SA 3.0</p>
</div> </div>
{/* {/*
<div className="footer__apps"> <div className="footer__apps">

View File

@ -57,7 +57,8 @@ const HomeMap: React.FC<IHomeMapProps> = ({
const createCustomIcon = (icon: StaticImageData) => { const createCustomIcon = (icon: StaticImageData) => {
const customIcon = new Icon({ const customIcon = new Icon({
iconUrl: icon.src, iconUrl: icon.src,
iconSize: [64, 64], iconSize: [32, 32],
iconAnchor: [16, 32]
}); });
return customIcon; return customIcon;

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
width="38" width="38"
height="100" height="50"
viewBox="0 0 38 100" viewBox="0 0 38 50"
fill="none" fill="none"
version="1.1" version="1.1"
id="svg1" id="svg1"
@ -45,8 +45,8 @@
fill="#ffffff" fill="#ffffff"
id="ellipse1" /> id="ellipse1" />
<circle <circle
cx="18.821751" cx="19"
cy="18.950451" cy="19"
r="7.5" r="7.5"
fill="#8fde6a" fill="#8fde6a"
id="circle1" /> id="circle1" />

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
width="38" width="38"
height="100" height="50"
viewBox="0 0 38 100" viewBox="0 0 38 50"
fill="none" fill="none"
version="1.1" version="1.1"
id="svg1" id="svg1"
@ -25,7 +25,7 @@
inkscape:deskcolor="#d1d1d1" inkscape:deskcolor="#d1d1d1"
inkscape:zoom="7.77" inkscape:zoom="7.77"
inkscape:cx="17.631918" inkscape:cx="17.631918"
inkscape:cy="29.66538" inkscape:cy="29.79408"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="991" inkscape:window-height="991"
inkscape:window-x="-9" inkscape:window-x="-9"
@ -45,8 +45,8 @@
fill="#ffffff" fill="#ffffff"
id="ellipse1" /> id="ellipse1" />
<circle <circle
cx="18.727512" cx="19"
cy="18.773014" cy="19"
r="7.5" r="7.5"
fill="#ffac33" fill="#ffac33"
id="circle1" /> id="circle1" />

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
width="38" width="38"
height="100" height="50"
viewBox="0 0 38 100" viewBox="0 0 38 50"
fill="none" fill="none"
version="1.1" version="1.1"
id="svg1" id="svg1"
@ -25,7 +25,7 @@
inkscape:deskcolor="#d1d1d1" inkscape:deskcolor="#d1d1d1"
inkscape:zoom="15.54" inkscape:zoom="15.54"
inkscape:cx="18.661519" inkscape:cx="18.661519"
inkscape:cy="53.185328" inkscape:cy="22.297297"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="991" inkscape:window-height="991"
inkscape:window-x="-9" inkscape:window-x="-9"
@ -45,8 +45,8 @@
fill="#ffffff" fill="#ffffff"
id="ellipse1" /> id="ellipse1" />
<circle <circle
cx="18.773014" cx="19"
cy="18.99272" cy="19"
r="7.5" r="7.5"
fill="#c288e2" fill="#c288e2"
id="circle1" /> id="circle1" />

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
width="38" width="38"
height="100" height="50"
viewBox="0 0 38 100" viewBox="0 0 38 50"
fill="none" fill="none"
version="1.1" version="1.1"
id="svg1" id="svg1"
@ -45,8 +45,8 @@
fill="#ffffff" fill="#ffffff"
id="ellipse1" /> id="ellipse1" />
<circle <circle
cx="18.821751" cx="19"
cy="18.950451" cy="19"
r="7.5" r="7.5"
fill="#87289d" fill="#87289d"
id="circle1" /> id="circle1" />

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
width="38" width="38"
height="100" height="50"
viewBox="0 0 38 100" viewBox="0 0 38 50"
fill="none" fill="none"
version="1.1" version="1.1"
id="svg1" id="svg1"
@ -24,8 +24,8 @@
inkscape:pagecheckerboard="0" inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1" inkscape:deskcolor="#d1d1d1"
inkscape:zoom="10.988439" inkscape:zoom="10.988439"
inkscape:cx="27.30142" inkscape:cx="27.301421"
inkscape:cy="35.264334" inkscape:cy="35.264336"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="991" inkscape:window-height="991"
inkscape:window-x="-9" inkscape:window-x="-9"
@ -45,8 +45,8 @@
fill="#ffffff" fill="#ffffff"
id="ellipse1" /> id="ellipse1" />
<circle <circle
cx="18.762922" cx="19"
cy="18.933889" cy="19"
r="7.5" r="7.5"
fill="#e64452" fill="#e64452"
id="circle1" /> id="circle1" />

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
width="38" width="38"
height="100" height="50"
viewBox="0 0 38 100" viewBox="0 0 38 50"
fill="none" fill="none"
version="1.1" version="1.1"
id="svg1" id="svg1"
@ -45,8 +45,8 @@
fill="#ffffff" fill="#ffffff"
id="ellipse1" /> id="ellipse1" />
<circle <circle
cx="18.757401" cx="19"
cy="18.886101" cy="19"
r="7.5" r="7.5"
fill="#fed363" fill="#fed363"
id="circle1" /> id="circle1" />

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -2,7 +2,7 @@
import "./ReviewSection.scss"; import "./ReviewSection.scss";
import { apiInstance } from "@/shared/config/apiConfig"; import { apiInstance } from "@/shared/config/apiConfig";
import { IReviewList } from "@/shared/types/review-type"; import { IReview } from "@/shared/types/review-type";
import { useSession } from "next-auth/react"; import { useSession } from "next-auth/react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import calendar from "./icons/calendar.svg"; import calendar from "./icons/calendar.svg";
@ -17,7 +17,7 @@ const ReviewSection: React.FC<IReviewsSectionProps> = ({
endpoint, endpoint,
id, id,
}: IReviewsSectionProps) => { }: IReviewsSectionProps) => {
const [reviews, setReviews] = useState<IReviewList>(); const [reviews, setReviews] = useState<IReview[]>();
const session = useSession(); const session = useSession();
const handleSubmit: React.MouseEventHandler< const handleSubmit: React.MouseEventHandler<
HTMLFormElement HTMLFormElement
@ -52,11 +52,10 @@ const ReviewSection: React.FC<IReviewsSectionProps> = ({
}; };
const getReviews = async () => { const getReviews = async () => {
const response = await apiInstance.get<IReviewList>( const response = await apiInstance.get<IReview[]>(
`/${endpoint}/${id}/reviews/` `/${endpoint}/${id}/reviews/`
); );
setReviews(response?.data);
setReviews(response.data);
}; };
useEffect(() => { useEffect(() => {
@ -94,7 +93,7 @@ const ReviewSection: React.FC<IReviewsSectionProps> = ({
</h3> </h3>
<ul> <ul>
{reviews?.results.map((review) => ( {reviews?.map((review) => (
<li key={review.id} className="review"> <li key={review.id} className="review">
<div className="review__author"> <div className="review__author">
<img <img