This commit is contained in:
Philip Cheung 2024-10-08 11:21:44 +08:00
parent eaabe01b4d
commit 19f4f9437a
4 changed files with 10 additions and 10 deletions

View File

@ -165,7 +165,7 @@ const EditAboutUs = ({ aboutUs, isOpen, onClose }: EditAboutUsProps) => {
<ModalCloseButton />
<ModalBody pb={30}>
<Box boxSize='auto'>
<Image src={url + "/" + aboutUs.image} />
<Image src={import.meta.env.VITE_IMAGE_URL+"/"+aboutUs.image} />
</Box>
<FormControl isRequired isInvalid={!!errors.title}>
<FormLabel htmlFor="title">Title</FormLabel>

View File

@ -231,7 +231,7 @@ const CourseDetails = () => {
/>
</FormControl>
<FormControl mt={4}></FormControl>
<button
{/* <button
type="button"
onClick={() => {
const values = getValues()
@ -240,7 +240,7 @@ const CourseDetails = () => {
}}
>
Get Values
</button>
</button> */}
<Button
variant="primary"
type="submit"

View File

@ -66,7 +66,7 @@ const CourseImages = () => {
},
onSettled: () => {
queryClient.invalidateQueries({ queryKey: ["courses"] })
},
})
@ -109,7 +109,7 @@ const CourseImages = () => {
<ActionsMenu type={"Image"} value={image} />
</Grid>
<Image key={index} src={url + "/" + image.image} objectFit="cover" />
<Image key={index} src={import.meta.env.VITE_IMAGE_URL + "/" + image.image} objectFit="cover" />
</Box>
))}
@ -145,7 +145,7 @@ const CourseImages = () => {
{errors.image && errors?.image.message}
</FormErrorMessage>
</FormControl>
<button
{/* <button
type="button"
onClick={() => {
const values = getValues()
@ -154,7 +154,7 @@ const CourseImages = () => {
}}
>
Get Values
</button>
</button> */}
<Button
variant="primary"
type="submit"

View File

@ -17,7 +17,7 @@ import {
Text,
Grid
} from "@chakra-ui/react"
import { useQueryClient, useMutation } from "@tanstack/react-query"
import { useQueryClient, useMutation } from "@tanstack/react-query"
import { useEffect } from "react"
import useCustomToast from "../../hooks/useCustomToast"
import { Info_imageService, type ApiError, CourseDetailsPublic, ImageCreate } from "../../client"
@ -65,7 +65,7 @@ const CourseInfoImages = () => {
},
onSettled: () => {
queryClient.invalidateQueries({ queryKey: ["courses"] })
},
})
@ -108,7 +108,7 @@ const CourseInfoImages = () => {
<ActionsMenu type={"Info_Image"} value={image} />
</Grid>
<Image key={index} src={url + "/" + image.image} objectFit="cover" />
<Image key={index} src={import.meta.env.VITE_IMAGE_URL + "/" + image.image} objectFit="cover" />
</Box>
))}