From eabf3bec154e15d5cdb0ea6c55aba5929ade4d51 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 21 May 2021 13:26:56 -0700 Subject: [PATCH] docs: fetch tags from correct url Signed-off-by: Andrea Luzzardi --- .../gatsby-theme-docs/components/Sidebar/Select/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/gendocs/src/@rocketseat/gatsby-theme-docs/components/Sidebar/Select/index.js b/tools/gendocs/src/@rocketseat/gatsby-theme-docs/components/Sidebar/Select/index.js index bcab8dba..129f1cb0 100644 --- a/tools/gendocs/src/@rocketseat/gatsby-theme-docs/components/Sidebar/Select/index.js +++ b/tools/gendocs/src/@rocketseat/gatsby-theme-docs/components/Sidebar/Select/index.js @@ -9,8 +9,10 @@ const Select = () => { useEffect(() => { async function getTags() { - const fetchTags = await fetch('https://s3-eu-west-1.amazonaws.com/daggerdoc.humans-it.com/tags.json').then(result => result.json()); - setTagsList(fetchTags); + const fetchTags = await fetch('/tags.json').then(result => result.json()); + if (fetchTags.length > 0) { + setTagsList(fetchTags); + } } getTags()