indent fix
This commit is contained in:
@@ -1,17 +1,17 @@
|
|||||||
import { Box } from "@/components/ui/box";
|
import {Box} from "@/components/ui/box";
|
||||||
import { Card } from "@/components/ui/card";
|
import {Card} from "@/components/ui/card";
|
||||||
import { Heading } from "@/components/ui/heading";
|
import {Heading} from "@/components/ui/heading";
|
||||||
import { Image } from "@/components/ui/image";
|
import {Image} from "@/components/ui/image";
|
||||||
import { Text } from "@/components/ui/text";
|
import {Text} from "@/components/ui/text";
|
||||||
import { VStack } from "@/components/ui/vstack";
|
import {VStack} from "@/components/ui/vstack";
|
||||||
import { Link } from "expo-router";
|
import {Link} from "expo-router";
|
||||||
import { Pressable, ActivityIndicator, View } from "react-native";
|
import {Pressable, ActivityIndicator, View} from "react-native";
|
||||||
import { useWishlist } from "@/store/wishlistStore";
|
import {useWishlist} from "@/store/wishlistStore";
|
||||||
import { useNoticesStore } from "@/store/noticesStore";
|
import {useNoticesStore} from "@/store/noticesStore";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
import {Ionicons} from "@expo/vector-icons";
|
||||||
import { useEffect, useState } from "react";
|
import {useEffect, useState} from "react";
|
||||||
|
|
||||||
export function NoticeCard({ notice }) {
|
export function NoticeCard({notice}) {
|
||||||
const noticeId = notice?.noticeId;
|
const noticeId = notice?.noticeId;
|
||||||
|
|
||||||
const toggleNoticeInWishlist = useWishlist(
|
const toggleNoticeInWishlist = useWishlist(
|
||||||
@@ -26,7 +26,7 @@ export function NoticeCard({ notice }) {
|
|||||||
const [image, setImage] = useState(null);
|
const [image, setImage] = useState(null);
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
|
|
||||||
const { getAllImagesByNoticeId } = useNoticesStore();
|
const {getAllImagesByNoticeId} = useNoticesStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let isMounted = true;
|
let isMounted = true;
|
||||||
@@ -68,7 +68,7 @@ export function NoticeCard({ notice }) {
|
|||||||
}, [noticeId]);
|
}, [noticeId]);
|
||||||
|
|
||||||
if (!notice) {
|
if (!notice) {
|
||||||
return <View style={{ flex: 1 }} />;
|
return <View style={{flex: 1}}/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -77,7 +77,7 @@ export function NoticeCard({ notice }) {
|
|||||||
<Card className="p-0 rounded-lg max-w-[460px] flex-1">
|
<Card className="p-0 rounded-lg max-w-[460px] flex-1">
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<Box className="h-auto w-full rounded-md aspect-[1/1] bg-gray-100 items-center justify-center">
|
<Box className="h-auto w-full rounded-md aspect-[1/1] bg-gray-100 items-center justify-center">
|
||||||
<ActivityIndicator size="large" color="#3b82f6" />
|
<ActivityIndicator size="large" color="#3b82f6"/>
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
<Image
|
<Image
|
||||||
|
|||||||
Reference in New Issue
Block a user