remove old showUrl
This commit is contained in:
parent
9eb6c0d08a
commit
781d75ccad
|
@ -1,27 +0,0 @@
|
|||
import * as React from "react";
|
||||
import { FallbackImg } from "../ui/fallback_img";
|
||||
import { PLACEHOLDER_FARMBOT } from "../farmware/images/image_flipper";
|
||||
import { t } from "i18next";
|
||||
|
||||
export const showUrl = (url: string, dirty: boolean) => {
|
||||
if (dirty) {
|
||||
return <p>{t("Press save to view.")}</p>;
|
||||
} else {
|
||||
if (url.includes(PLACEHOLDER_FARMBOT)) {
|
||||
return <div className="webcam-stream-unavailable">
|
||||
<FallbackImg className="webcam-stream"
|
||||
src={url}
|
||||
fallback={PLACEHOLDER_FARMBOT} />
|
||||
<text>
|
||||
{t("Webcam stream not available.")}
|
||||
<br />
|
||||
{t("Press ")}<b>{t("EDIT")}</b>{t(" to add a stream.")}
|
||||
</text>
|
||||
</div>;
|
||||
} else {
|
||||
return <FallbackImg className="webcam-stream"
|
||||
src={url}
|
||||
fallback={PLACEHOLDER_FARMBOT} />;
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue