diff --git a/src/app/components/Head.tsx b/src/app/components/Head.tsx index 5302f94b..60826cdd 100644 --- a/src/app/components/Head.tsx +++ b/src/app/components/Head.tsx @@ -5,43 +5,9 @@ import { import { useTranslation } from "react-i18next"; import { Icon } from "design-react-kit"; -// let timer = null; -// let lastGen = null; - export const Head = (): JSX.Element => { - // const [info, setInfo] = useState(null); const { t } = useTranslation(); - // const updateGen = (lastGen) => { - // let info = null; - // if (lastGen) { - // info = moment(lastGen).locale(DEFAULT_LANGUAGE).fromNow(); - // timer = setTimeout( - // function() { - // updateGen(lastGen); - // }.bind(this), - // 30000 - // ); - // } - // setInfo(info); - // }; - - // useEffect(() => { - // if (props.lastGen != lastGen) { - // if (timer) { - // clearTimeout(timer); - // } - // updateGen(props.lastGen); - - // return () => { - // //unmount - // if (timer) { - // clearTimeout(timer); - // } - // }; - // } - // }, [props.lastGen]); - return (
{t("editor.title")}
@@ -61,11 +27,6 @@ export const Head = (): JSX.Element => { {t("editor.source_code")} - {/* {info && ( - - {t("editor.lastgeneration")}: {info} - - )} */}
diff --git a/src/app/contents/constants.ts b/src/app/contents/constants.ts index a354bd62..2027bfdc 100644 --- a/src/app/contents/constants.ts +++ b/src/app/contents/constants.ts @@ -9,12 +9,8 @@ export const { } = process.env; export const documentationUrl = `https://yml.publiccode.tools`; -export const versionsUrl = `https://api.github.com/repos/${REPOSITORY}/contents/version`; export const SAMPLE_YAML_URL = `https://raw.githubusercontent.com/italia/publiccode-editor/master/publiccode.yml`; export const elasticUrl = ELASTIC_URL || ""; -export const validatorUrl = VALIDATOR_URL || ""; -export const validatorRemoteUrl = VALIDATOR_REMOTE_URL || ""; -export const APP_FORM = "appForm"; export const defaultCountry = DEFAULT_COUNTRY || "it"; export const AUTOSAVE_TIMEOUT = 15000; export const NOTIFICATION_TIMEOUT = 3000; diff --git a/src/app/utils/calls.ts b/src/app/utils/calls.ts index c683bc74..85daf23b 100644 --- a/src/app/utils/calls.ts +++ b/src/app/utils/calls.ts @@ -23,15 +23,6 @@ export const getDefaultBranch = async (urlString: string) => { } }; -/* -export const getReleases = (versionsUrl) => { - return fetch(versionsUrl) - .then((res) => res.json()) - .then((data) => data.filter((d) => d.type == "dir")) - .then((data) => data.map((d) => d.name)); -}; -*/ - export const getRemotePubliccode = async (yamlURL: string) => { const myInit = { method: "GET",