Add inline code documentation

This commit is contained in:
Igor Carvalho 2023-07-18 15:29:58 -03:00 committed by anovazzi1
commit 21d63be4b4
10 changed files with 12 additions and 0 deletions

View file

@ -54,6 +54,7 @@ export default function ParameterComponent({
const { closePopUp } = useContext(PopUpContext);
const { setTabsState, tabId, save } = useContext(TabsContext);
// Update component position
useEffect(() => {
if (ref.current && ref.current.offsetTop && ref.current.clientHeight) {
setPosition(ref.current.offsetTop + ref.current.clientHeight / 2);

View file

@ -18,6 +18,7 @@ export default function FloatComponent({
const min = 0;
const max = 1;
// Clear component state
useEffect(() => {
if (disabled) {
setMyValue("");

View file

@ -27,6 +27,7 @@ export default function Header() {
const [stars, setStars] = useState(null);
// Get and set numbers of stars on header
useEffect(() => {
async function fetchStars() {
const starsCount = await getRepoStars("logspace-ai", "langflow");

View file

@ -17,6 +17,7 @@ export default function InputComponent({
const { setDisableCopyPaste } = useContext(TabsContext);
const { closePopUp } = useContext(PopUpContext);
// Clear component state
useEffect(() => {
if (disabled) {
setMyValue("");

View file

@ -18,6 +18,8 @@ export default function InputFileComponent({
const [loading, setLoading] = useState(false);
const { setErrorData } = useContext(alertContext);
const { tabId } = useContext(TabsContext);
// Clear component state
useEffect(() => {
if (disabled) {
setMyValue("");

View file

@ -15,6 +15,7 @@ export default function IntComponent({
const min = 0;
const { closePopUp } = useContext(PopUpContext);
// Clear component state
useEffect(() => {
if (disabled) {
setMyValue("");

View file

@ -16,6 +16,7 @@ export default function TextAreaComponent({
const { openPopUp, closePopUp } = useContext(PopUpContext);
const { setDisableCopyPaste } = useContext(TabsContext);
// Clear text area
useEffect(() => {
if (disabled) {
setMyValue("");

View file

@ -8,6 +8,8 @@ export default function ToggleComponent({
setEnabled,
disabled,
}: ToggleComponentType) {
// set component state as disabled
useEffect(() => {
if (disabled) {
setEnabled(false);

View file

@ -39,6 +39,7 @@ export default function CodeAreaModal({
}
}
// Check for custom code errors
function handleClick() {
postValidateCode(code)
.then((apiReturn) => {

View file

@ -37,6 +37,7 @@ export default function CommunityPage() {
}
const navigate = useNavigate();
// Show community examples on page start
useEffect(() => {
handleExamples();
}, []);