Commit d01cb05f authored by kavusi98's avatar kavusi98
Browse files

(#15) Hid favorited by if not logged in

parent e5ff38b3
import React, { useState } from "react";
import { selectUserName } from "../../services/selectors"
import { selectUserIsLoggedIn, selectUserName } from "../../services/selectors"
import { useSelector } from "react-redux";
import {
formatDateAsString,
......@@ -23,9 +23,9 @@ interface ModalProps {
* @param movie to show, onCloseClick function to close/open the modal
* @returns a Modal with MovieDetal.
*/
const MovieModal: React.FC<ModalProps> = ({movie, setIsModalVisible, isModalVisible}) => {
const MovieModal: React.FC<ModalProps> = ({movie, setIsModalVisible, isModalVisible}:ModalProps) => {
const userName = useSelector(selectUserName)
const isLoggedIn = useState(true);
const isLoggedIn = useSelector(selectUserIsLoggedIn)
const [fontsLoaded] = useFonts({
'Quicksand-Regular': require('../../assets/fonts/Quicksand-Regular.ttf'),
'Quicksand-Medium': require('../../assets/fonts/Quicksand-Medium.ttf'),
......
import { ApolloClient, InMemoryCache } from "@apollo/client";
export const apolloClient = new ApolloClient({
uri: "http://it2810-29-idi.ntnu.no:4000/graphql",
uri: "http://it2810-29.idi.ntnu.no:4000/graphql",
cache: new InMemoryCache(),
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment