hard code s3 bucket region

This commit is contained in:
hzrd149 2024-08-27 08:51:33 +03:00
parent 8a0fb53ff9
commit 808ca81036
2 changed files with 6 additions and 3 deletions

View File

@ -37,7 +37,7 @@ jobs:
with:
folder: dist
bucket: "${{ secrets.S3_BUCKET }}"
bucket-region: "${{ secrets.S3_BUCKET_REGION }}"
bucket-region: us-east-1
dist-id: "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}"
invalidation: /
delete-removed: true

View File

@ -1,4 +1,4 @@
import { useCallback } from "react";
import { useCallback, useEffect } from "react";
import { ButtonGroup, Flex, IconButton, Input, Select } from "@chakra-ui/react";
import { useNavigate, useSearchParams, Link as RouterLink } from "react-router-dom";
@ -23,11 +23,14 @@ export function SearchPage() {
const searchQuery = params.get("q") || "";
const searchRelay = params.get("relay") || searchRelays[0];
const { register, handleSubmit } = useForm({
const { register, handleSubmit, setValue } = useForm({
defaultValues: { query: searchQuery, relay: searchRelay },
mode: "all",
});
// reset the relay when the search relay changes
useEffect(() => setValue("relay", searchRelay), [searchRelay]);
const handleSearchText = (text: string) => {
const cleanText = text.trim();