Skip to content

Commit

Permalink
fix: image imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rdtabb committed Sep 23, 2023
1 parent ed66d83 commit e31be31
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/components/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
DocumentData,
} from "firebase/firestore";
import MeetsLogoIcon from "../assets/meets-logo.svg";
import GoogleIcon from '../assets/google-icon.svg'
import useGeneralContext from "../hooks/useContextHooks/useGeneralContext";

export const Auth = () => {
Expand Down Expand Up @@ -64,7 +65,7 @@ export const Auth = () => {
</div>
<h1 className="auth__header">Sign in with Google</h1>
<button onClick={signin} className="auth__signin">
<img className="signin-icon" src="src/assets/google-icon.svg" alt="" />
<img className="signin-icon" src={GoogleIcon} alt="Google icon" />
Sign in
</button>
</main>
Expand Down
3 changes: 2 additions & 1 deletion src/components/Profile/AvatarImage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { memo } from "react";
import { useDispatch } from "react-redux";
import { setOpenPopupType } from "../../features/modal/modalSlice";
import EditPopupIcon from '../../assets/editPopupIcon.svg'

type AvatarImageProps = {
userPicture: string;
Expand All @@ -20,7 +21,7 @@ const AvatarImage = ({ userPicture }: AvatarImageProps) => {
/>
<img
className="avatar-wrapper__icon"
src="src/assets/editPopupIcon.svg"
src={EditPopupIcon}
alt="edit profile icon"
/>
</div>
Expand Down
11 changes: 7 additions & 4 deletions src/components/likedposts/LikedHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
import { Link } from "react-router-dom";
import Signout from "../Signout/Signout";
import MeetsLogoIcon from '../../assets/meets-logo.svg'
import SearchIcon from '../../assets/icons8-search.svg'
import ProfileIcon from '../../../public/profile-icon.svg'

const LikedHeader = () => {
return (
<header className="header header-profile">
<img
src="src/assets/meets-logo.svg"
src={MeetsLogoIcon}
alt="Meets-logo"
className="header__logo"
></img>
<div className="header__routes">
<Link className="header__search" to="/usersearch">
<img
className="header__search-icon header__icon"
src="src/assets/icons8-search.svg"
src={SearchIcon}
alt="search-icon"
/>
</Link>
<Link to="/">
<img
className="header__icon"
src="../../../public/profile-icon.svg"
alt=""
src={ProfileIcon}
alt="ProfileIcoon"
/>
</Link>
<Signout />
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useQueryHooks/useComments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
UseQueryResult,
} from "@tanstack/react-query";
import { handleAddComment, fetchComments } from "../../methods/methods";
import { AddCommentMutationProps } from "../../types/Types";
import { AddCommentMutationProps, Comment } from "../../types/Types";

type UseCommentType = "query" | "mutation";

Expand Down
1 change: 1 addition & 0 deletions src/methods/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const handleAddComment = async ({
post,
id: userid,
}: AddCommentMutationProps): Promise<void> => {
if (typeof userid === "undefined") throw new Error("You cannot provide uid of type undefined")
const userdoc = doc(db, "users", userid);
const dataSnap = await getDoc(userdoc);
const dataset = dataSnap.data();
Expand Down

0 comments on commit e31be31

Please sign in to comment.