-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6716cf2
commit 5333ba9
Showing
7 changed files
with
87 additions
and
85 deletions.
There are no files selected for viewing
60 changes: 0 additions & 60 deletions
60
apps/builder/components/shared/ImageUploadContent/GiphySearch.tsx
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
apps/builder/components/shared/ImageUploadContent/GiphySearchForm.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Flex, Stack, Text } from '@chakra-ui/react' | ||
import { GiphyFetch } from '@giphy/js-fetch-api' | ||
import { Grid } from '@giphy/react-components' | ||
import { GiphyLogo } from 'assets/logos' | ||
import React, { useState } from 'react' | ||
import { env, isEmpty } from 'utils' | ||
import { Input } from '../Textbox' | ||
|
||
type GiphySearchFormProps = { | ||
onSubmit: (url: string) => void | ||
} | ||
|
||
const giphyFetch = new GiphyFetch(env('GIPHY_API_KEY') as string) | ||
|
||
export const GiphySearchForm = ({ onSubmit }: GiphySearchFormProps) => { | ||
const [inputValue, setInputValue] = useState('') | ||
|
||
const fetchGifs = (offset: number) => | ||
giphyFetch.search(inputValue, { offset, limit: 10 }) | ||
|
||
const fetchGifsTrending = (offset: number) => | ||
giphyFetch.trending({ offset, limit: 10 }) | ||
|
||
return isEmpty(env('GIPHY_API_KEY')) ? ( | ||
<Text>NEXT_PUBLIC_GIPHY_API_KEY is missing in environment</Text> | ||
) : ( | ||
<Stack> | ||
<Flex align="center"> | ||
<Input | ||
flex="1" | ||
autoFocus | ||
placeholder="Search..." | ||
onChange={setInputValue} | ||
value={inputValue} | ||
withVariableButton={false} | ||
/> | ||
<GiphyLogo w="100px" /> | ||
</Flex> | ||
<Flex overflowY="scroll" maxH="400px"> | ||
<Grid | ||
key={inputValue} | ||
onGifClick={(gif, e) => { | ||
e.preventDefault() | ||
onSubmit(gif.images.downsized.url) | ||
}} | ||
fetchGifs={inputValue === '' ? fetchGifsTrending : fetchGifs} | ||
width={475} | ||
columns={3} | ||
className="my-4" | ||
/> | ||
</Flex> | ||
</Stack> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5333ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2 – ./apps/viewer
app.yvon.earth
bot.joof.it
bot.tvbeat.it
bergamo.store
bots.bridge.ai
talk.gocare.io
gollum.riku.ai
bot.jesopizz.it
chat.hayuri.id
yoda.riku.ai
bot.contakit.com
bot.rihabilita.it
fitness.riku.ai
zap.fundviser.in
viewer.typebot.io
bot.danyservice.it
bot.dsignagency.com
chatbot.matthesv.de
88584434.therpm.club
demo.wemakebots.xyz
92109660.therpm.club
bot.coachayongzul.com
bot.barrettamario.it
hello.advergreen.com
bot.outstandbrand.com
bot.robertohairlab.it
bot.ilmuseoaiborghi.it
bot.eikju.photography
bot.digitalpointer.id
criar.somaperuzzo.com
bot.pratikmandalia.com
form.bridesquadapp.com
michaeljackson.riku.ai
87656003.actualizar.xyz
88152257.actualizar.xyz
arrivalx2.wpwakanda.com
91375310.actualizar.xyz
link.venturasuceder.com
invite.bridesquadapp.com
bot.hotelplayarimini.it
bot.amicidisanfaustino.it
chat.thehomebuyersusa.com
forms.hiabhaykulkarni.com
typebot-viewer.vercel.app
bot.adventureconsulting.hu
chat.atlasoutfittersk9.com
casestudyemb.wpwakanda.com
herbalife.barrettamario.it
homepageonly.wpwakanda.com
liveconvert.kandalearn.com
tarian.theiofoundation.org
mainmenu1one.wpwakanda.com
bot.pinpointinteractive.com
bot.seidinembroseanchetu.it
viewer-v2-typebot-io.vercel.app
bot.seidibergamoseanchetu.it
liveconvert2.kandalearn.com
forms.escoladeautomacao.com.br
bot.studiotecnicoimmobiliaremerelli.it
bot.polychromes-project.com
viewer-v2-git-main-typebot-io.vercel.app
5333ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
builder-v2 – ./apps/builder
builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app
app.typebot.io
5333ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs – ./apps/docs
docs-git-main-typebot-io.vercel.app
docs-typebot-io.vercel.app
docs.typebot.io
5333ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
landing-page-v2 – ./apps/landing-page
www.get-typebot.com
get-typebot.com
landing-page-v2-git-main-typebot-io.vercel.app
landing-page-v2-typebot-io.vercel.app
www.typebot.io
typebot.io
5333ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2-alpha – ./apps/viewer
8jours.top
bot.aws.bj
sat.cr8.ai
bt.id8rs.com
yobot.me
247987.com
am.nigerias.io
finplex.be
vhpage.cr8.ai
bot.aipr.kr
aso.nigerias.io
bot.artiweb.app
ar.nigerias.io
bot.lalmon.com
an.nigerias.io
apo.nigerias.io
ticketfute.com
apr.nigerias.io
eventhub.com.au
chat.sureb4.com
games.klujo.com
sakuranembro.it
typebot.aloe.do
bot.piccinato.co
bot.upfunnel.art
rdhs.digienge.io
faqs.nigerias.io
kw.wpwakanda.com
feedback.ofx.one
clo.closeer.work
typebot.aloe.bot
stan.vselise.com
voicehelp.cr8.ai
app.chatforms.net
bot.phuonghub.com
cares.urlabout.me
bot.maitempah.com
gentleman-shop.fr
bot.agfunnel.tech
fmm.wpwakanda.com
lb.ticketfute.com
k1.kandabrand.com
ov1.wpwakanda.com
ov3.wpwakanda.com
bot.neferlopez.com
andreimayer.com.br
goalsettingbot.com
1988.bouclidom.com
dicanatural.online
ov2.wpwakanda.com
rdhs06.digienge.io
survey.digienge.io
this-is-a-test.com
zap.techadviser.in
bot.digitalbled.com
carsalesenquiry.com
bot.eventhub.com.au
forms.webisharp.com
order.maitempah.com
quest.wpwakanda.com
typebot.stillio.com
survey1.digienge.io
bot.ansuraniphone.my
bium.gratirabbit.com
chat.hayurihijab.com
click.sevenoways.com
bot.cotemeuplano.com
connect.growthguy.in
get.freebotoffer.xyz
abutton.wpwakanda.com
bbutton.wpwakanda.com
aidigitalmarketing.kr
bot.meuesocial.com.br
bot.incusservices.com
bbutton.wpwwakanda.com
chat.missarkansas.org
sbutton.wpwakanda.com
cdd.searchcube.com.sg
apply.ansuraniphone.my
c23111azqw.nigerias.io
form.searchcube.com.sg
felipewelington.com.br
gcase.barrettamario.it
info.clickasuransi.com
kodawariab736.skeep.it
report.gratirabbit.com
view.onlinebotdemo.xyz
resume.gratirabbit.com
83242573.actualizar.xyz
bot.blackboxtips.com.br
signup.hypemarketing.in
bot.upgradesolutions.eu
mainmenu.diddancing.com
subfooter.wpwakanda.com
survey.hypemarketing.in
91181264.your-access.one
form.sergiolimajr.com.br
type.opaulovieira.com.br
bot.blackboxsports.com.br
aibot.angrybranding.co.uk