Skip to content

Commit

Permalink
feat: minute bug fixes for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ivinayakg committed Mar 1, 2024
1 parent 1242772 commit 909e018
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 3 additions & 1 deletion api/helpers/urls.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package helpers
import (
"os"
"strings"

"github.com/ivinayakg/shorte.live/api/constants"
)

func EnforceHTTP(url string) string {
Expand Down Expand Up @@ -30,7 +32,7 @@ func RemoverDomainError(url string) bool {
}

func BuildUrl(url string) string {
if ENV == "development" {
if ENV != string(constants.Prod) {
return "http://" + os.Getenv("SHORTED_URL_DOMAIN") + url
}
return "https://" + os.Getenv("SHORTED_URL_DOMAIN") + url
Expand Down
2 changes: 0 additions & 2 deletions client/src/components/DeleteURLModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ import { Button } from "@/components/ui/button";
function DeleteURL(
{
urlObj,
userState,
}: {
urlObj: any;
userState: UserState;
},
ref: any
) {
Expand Down
7 changes: 1 addition & 6 deletions client/src/components/UpdateURLModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ import { Input } from "@/components/ui/input";
function UpdateURL(
{
urlObj,
userState,
}: {
urlObj: any;
userState: UserState;
},
ref: any
) {
Expand Down Expand Up @@ -96,10 +94,7 @@ function UpdateURL(
<Label className="text-left">
Custom Short - <i>{urlObj?.short}</i>
</Label>
<Input
name="short"
className="col-span-3"
/>
<Input name="short" className="col-span-3" />
</div>
<div className="grid grid-rows-2 items-center gap-4">
<Label className="text-left">
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/MyUrls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function MyUrls() {

return (
<div className="py-5">
<UpdateURLModal urlObj={urlObj} userState={userState} ref={editRef} />
<DeleteURLModal urlObj={urlObj} userState={userState} ref={deleteRef} />
<UpdateURLModal urlObj={urlObj} ref={editRef} />
<DeleteURLModal urlObj={urlObj} ref={deleteRef} />
<HeadingOne className="font-bold mb-3">Your URLs</HeadingOne>
<div className="flex flex-col justify-center items-center gap-4">
{urlsData?.map((url: any) => {
Expand Down

0 comments on commit 909e018

Please sign in to comment.